gridscale / terraform-provider-gridscale

Terraform gridscale provider
https://registry.terraform.io/providers/gridscale/gridscale/latest/docs
Mozilla Public License 2.0
12 stars 11 forks source link

Reading sshkey from file causes key to be set with every apply #116

Closed envy closed 3 years ago

envy commented 3 years ago

Using file() to read an ssh key causes terraform to think that the key at gridscale changed every time.

I suspect that when refreshing the state, no trailing whitespace will be on the key string so terraform thinks it is different.

Terraform Version

0.14.4 (0.13.4 also affected)

Affected Resource(s)

Terraform Configuration Files

See #112

Debug Output

Not needed I think.

Panic Output

No panic

Expected Behavior

Setting the key once should

Actual Behavior

What actually happened?

Steps to Reproduce

  1. Create an sshkey resource that reads the key from file
  2. terraform apply
  3. Key has now been created
  4. terraform apply will again set the key
  5. Repeat as needed, every apply will set the key anew

Important Factoids

None

References

nvthongswansea commented 3 years ago

@envy Thanks for reporting the issue. I've fixed it, and will release a hot fix asap.

nvthongswansea commented 3 years ago

@envy Could you try the new release, please? v1.8.2

envy commented 3 years ago

Looks good, thanks!