-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(iam_ssh_key): do not read public key in resource #2695
base: master
Are you sure you want to change the base?
fix(iam_ssh_key): do not read public key in resource #2695
Conversation
This caused the value to differ from requested input and this can lead to issue in terraform if the value is used in other resources. Also as it cannot be updated, it seems right to assume the local key is the correct key
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2695 +/- ##
==========================================
- Coverage 71.43% 71.02% -0.42%
==========================================
Files 277 334 +57
Lines 35875 33511 -2364
==========================================
- Hits 25628 23800 -1828
+ Misses 8028 7402 -626
- Partials 2219 2309 +90 ☔ View full report in Codecov by Sentry. |
@@ -55,6 +55,14 @@ func ResourceSSKKey() *schema.Resource { | |||
areEqual := bytes.Equal(marshalledOldValue, marshalledNewValue) | |||
return areEqual | |||
}, | |||
StateFunc: func(v interface{}) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a bit of documentation explaining that the last part of the public key will be trimmed.
Could you do additional testing to ensure that the formatting happening in the terraform state is consistant with the key stored on the IAM backend? |
This caused the value to differ from requested input and this can lead to issue in terraform if the value is used in other resources.
Also as it cannot be updated, it seems right to assume the local key is the correct key