Initialize the gate client on CRUD
KeisukeYamashita opened this issue · 1 comments
KeisukeYamashita commented
WHAT
As title. Lazy client initialize.
WHY
In initial Armory's Spinnaker Terraform Provider implementation, it depends on the spinnaker/spin.
- providerConfigFunc →
If the tfstate has Spinnaker resource, on terraform plan
, terraform will initialize the gateclient. However, on the initialize, the spin will try to access the the Spinnaker API.
- NewGateClient → https://github.com/spinnaker/spin/blob/b08b4209beee7cf6ebb006d029c0a97fb1ae5a87/cmd/gateclient/client.go#L99-L195
- the line the spin will access Spinnaker API on client inilization → https://github.com/spinnaker/spin/blob/b08b4209beee7cf6ebb006d029c0a97fb1ae5a87/cmd/gateclient/client.go#L188
If the provider can't access the Spinnaker API on terraform init
that is okay.
We should avoid the CI to fail when we change the lab Spinnaker authn method.
KeisukeYamashita commented
No, this is not needed.