Skip to content
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

Merged

Conversation

m-s-austin
Copy link
Contributor

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.

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))
Copy link
Contributor

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

Copy link
Contributor Author

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

@catsby
Copy link
Contributor

catsby commented Oct 28, 2015

One nitpick, otherwise looks good.

Curious, did you consider doing an update db API call directly, instead of passing off to the update method?

@catsby catsby added the waiting-response An issue/pull request is waiting for a response from the community label Oct 28, 2015
@m-s-austin
Copy link
Contributor Author

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?

@catsby
Copy link
Contributor

catsby commented Oct 30, 2015

My concern would be any untended or otherwise unexpected updates being applied

@m-s-austin
Copy link
Contributor Author

I’d think it would be no different than calling terraform apply again, so it should properly track which resources are dirty or not?

On Oct 30, 2015, at 10:18 AM, Clint notifications@github.com wrote:

My concern would be any untended or otherwise unexpected updates being applied


Reply to this email directly or view it on GitHub #3513 (comment).

@catsby catsby removed the waiting-response An issue/pull request is waiting for a response from the community label Nov 2, 2015
@catsby
Copy link
Contributor

catsby commented Nov 2, 2015

Thats probably OK then, thanks!

catsby added a commit that referenced this pull request Nov 2, 2015
…security-v6.3

Provider/aws Apply security group after restoring db_instance from snapshot
@catsby catsby merged commit 6492853 into hashicorp:master Nov 2, 2015
@ghost
Copy link

ghost commented Apr 30, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants