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

aws_security_group module : can't use multiple ingress blobs with same ports/protocols #3204

Closed
neodem opened this issue Jan 30, 2018 · 1 comment · Fixed by #4416
Closed
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@neodem
Copy link

neodem commented Jan 30, 2018

Terraform Version

Terraform v0.11.2

  • provider.aws v1.8.0

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_security_group

While it's possible to have multiple ingress blobs in a sec group resource that have duplicate from_port, to_port and protocol fields, TF has trouble processing when you try to apply multiple times. The first time is great and it creates the security group perfectly, but in subsequent plan/apply cycles, it determines that there has been a change and tries to update the security group.

The issue, I believe is that only those 3 fields are required so I'm assuming that some key/hash is being created from those 3 fields. So if you have other discriminating fields like cidr_blocks or description, they aren't considered when TF is checking for idempotentcy.

This makes creating complex security groups difficult since you need to collect all cidr_blocks together for each port pair and you can't add descriptions to different blocks.

@radeksimko radeksimko added service/ec2 Issues and PRs that pertain to the ec2 service. bug Addresses a defect in current functionality. labels Jan 31, 2018
@bflad bflad added this to the v1.19.0 milestone May 10, 2018
@bflad
Copy link
Contributor

bflad commented May 10, 2018

Hi folks 👋 Sorry this has been a longstanding issue with the AWS provider. The fix for this should be contained in #4416 which will be released with v1.19.0 of the AWS provider, likely middle of next week.

Shout outs to @loivis (and @svanharmelen who submitted an earlier, likely correct PR, which I admittedly should have reviewed and merged sooner: #3628)

Given there were so many various issues surrounding this bug, I will be locking this issue (amongst all the others) to encourage any lingering issues/discussion to be fully described in new issue(s) for consolidation. Thanks for your understanding.

@hashicorp hashicorp locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants