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

security group change of instance in VPC shouldn't require new resource #194

Closed
lgtml opened this issue Aug 14, 2014 · 13 comments
Closed

security group change of instance in VPC shouldn't require new resource #194

lgtml opened this issue Aug 14, 2014 · 13 comments

Comments

@lgtml
Copy link

lgtml commented Aug 14, 2014

Security group membership changes on VPC nodes should not be destructive.

To reproduce:

  1. Launch a node with default security groups than update the instance.
  2. Run Apply

note: will open another issue in regards to the security group ordering.

    security_groups.0: "sg-aaaaaaa" => "sg-bbbbbbb" (forces new resource)
    security_groups.1: "sg-bbbbbbb" => "sg-aaaaaaa" (forces new resource)
@tmtk75
Copy link
Contributor

tmtk75 commented Aug 18, 2014

FYI: I also ran into this problem and sent a pull request to fix this.
#185
It works well on my local.

@mitchellh
Copy link
Contributor

@tmtk75 I think you addressed ordering, but this is another issue which is that with VPCs, security group updates shouldn't require a new resource.

@mitchellh mitchellh added bug and removed enhancement labels Aug 20, 2014
@lgtml
Copy link
Author

lgtml commented Aug 20, 2014

@tmtk75 Yes your ordering fix does work, but I this is a different issue where nodes in VPC should not be destroyed if you change their security group membership.

I should have clarified further. Thank you

@tmtk75
Copy link
Contributor

tmtk75 commented Aug 20, 2014

Hi, guys.
Thanks for your explanations! I understood.

@mitchellh
Copy link
Contributor

I'm working on a branch on converting the aws_isntance resource to the new helper/schema framework, which will more easily enable both of these fixes. I'm in a branch now.

@mitchellh
Copy link
Contributor

Ordering has been fixed, now we have the update vs recreate issue.

@mitchellh mitchellh changed the title VPC: Security Group Change security group change of instance in VPC shouldn't require new resource Sep 9, 2014
@ashmere
Copy link
Contributor

ashmere commented Dec 3, 2014

any update as this destroying instances on every security group change or addition isn't really viable for a lot of use cases

@armon
Copy link
Member

armon commented Dec 8, 2014

@ashmere I think this is being caused by the set handling which may be resolved via #616

@davedash
Copy link
Contributor

davedash commented Feb 9, 2015

I don't think it's being caused by a set issue. Or rather that issue is solved, this issue remains:

    security_groups.#:          "3" => "2" (forces new resource)
    security_groups.3052868674: "sg-e95bb28d" => "sg-e95bb28d" (forces new resource)
    security_groups.3312015480: "sg-a22dc2c6" => "sg-a22dc2c6" (forces new resource)

This should just remove the spurious SG since we're in VPC.

@ggiamarchi
Copy link
Contributor

@davedash It seems to be the same as #873

@catsby
Copy link
Contributor

catsby commented Mar 16, 2015

This may be fixed with #1153 which looks promising but needs to be rebased on master

@mitchellh
Copy link
Contributor

It is fixed by #1153 (or at least, the trail starting there)

@ghost
Copy link

ghost commented May 3, 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 May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants