-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 Apply security group after restoring db_instance from snapshot #3513
Provider/aws Apply security group after restoring db_instance from snapshot #3513
Conversation
for _, v := range attr.List() { | ||
s = append(s, aws.String(v.(string))) | ||
} | ||
log.Printf("[INFO] DB is restoring from snapshot with default security, but should be set to %s", v.(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.
v.(string)
here should be s
, the []*string
slice
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.
good catch, thanks I will fix shortly
One nitpick, otherwise looks good. Curious, did you consider doing an update db API call directly, instead of passing off to the update method? |
I did consider it, and felt it would be unnecessarily duplicating code, plus I didn't see any immediate negative to just using the update method. Did you see some reason to prefer one way or the other? |
My concern would be any untended or otherwise unexpected updates being applied |
I’d think it would be no different than calling terraform apply again, so it should properly track which resources are dirty or not?
|
Thats probably OK then, thanks! |
…security-v6.3 Provider/aws Apply security group after restoring db_instance from snapshot
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. |
Currently awsgosdk (and terraform by extension) assign a newly restored snapshot only the default security group. This patch causes the resource to check if the vpc_security_group_ids list is set, and if it is it waits for the restored DB to become available and then updates it in order to get the settings in the right state.