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_default_security_group fails on a repetitive run when description is defined #3482

Closed
MaximF opened this issue Feb 22, 2018 · 2 comments
Closed
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@MaximF
Copy link

MaximF commented Feb 22, 2018

Hi there,

Terraform Version

» terraform -v
Terraform v0.11.3
+ provider.aws v1.9.0

Affected Resource

  • aws_default_security_group

Terraform Configuration Files

resource "aws_default_security_group" "default" {
  vpc_id = "${aws_vpc.company.id}"

  ingress {
    protocol  = -1
    from_port = 0
    to_port   = 0
    description = "My Security Group"
  }

Panic Output

* aws_default_security_group.default: Error revoking security group ingress rules: InvalidPermission.NotFound: The specified rule does not exist in this security group.
	status code: 400, request id: 41707628-1b5c-4659-ae2f-0621259d0515

Expected Behavior

Nothing should be changed

Actual Behavior

When description value is defined it works well on the first run and then reprovisioning fails even with no changes got introduced.
Without description value it works no matter how many times it got reran.

Steps to Reproduce

  1. Define description in aws_default_security_group resource.
  2. Run it for the first time. It should add description.
  3. Run it again. It would fail with the mentioned error.
  4. Manually remove that rule and re-run script. It would go through.
  5. Run it again and it would show you an error message again.
@bflad bflad added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Feb 22, 2018
@pmacdougall
Copy link

I believe this is the same issue as #2069 but for aws_default_security_group instead of the generic aws_security_group

@bflad bflad added this to the v1.19.0 milestone May 10, 2018
@bflad
Copy link
Contributor

bflad commented May 10, 2018

Hi folks 👋 I believe 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.

Given there were so many various issues surrounding this bug (this resource uses the same code as aws_security_group for rules handling), 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.

@bflad bflad closed this as completed May 10, 2018
@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

No branches or pull requests

3 participants