-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
provider/aws: Add IAM Server Certificate resource #2086
Conversation
ServerCertificateName: aws.String(d.Get("name").(string)), | ||
} | ||
|
||
if v, ok := d.GetOk("certificate_chain"); ok { |
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.
v
could be named certChain
or similar for clarity.
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.
the v, ok
is a kind of established convention here. Because of GetOk("certificate_chain")
, inside the block it's pretty clear what that value represents. I'm not strictly opposed to changing it though, but I think it's OK as is since the variable is so short lived 😄
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.
I agree with @catsby here. It's a short lived variable - exactly one line.
c162eea
to
be7ece0
Compare
Looks great! 👍 |
provider/aws: Add IAM Server Certificate resource
looks like it does not work as expected when certificate_chain |
They @alekseymykhailov – the Thanks! |
@catsby it happens (delete and re-create) even if I don't change certificate_chain. Terraform always re-create certificate on AWS here is my test configuration
here is how to reproduce:
after this step I can retrieve cert using aws cli so now I'm doing
here you can see that terraform shows me that certificate_chain changed (looks like it just appended chain file to existent data again - I had 2 certs in chain, now terraform shows 4 .. just noticed this) now terraform apply (note that now it shows 2 certs in chain instead of 4 in "plan" output):
|
hey @alekseymykhailov – so sorry for the silence here. I believe the issue you're reporting here was addressed in #2411. I hope you're not hitting this issue anymore, but please let me know if you are! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Adds a new AWS Resource, IAM Server Certificate:
Server certs uploaded to IAM can be used in a few places:
Adding docs now, wanted to open for any thoughts from @phinze
UPDATE: docs added, squashed