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: Fix issue with ignoring the 'self' attribute of a Security Group rule #1223

Merged
merged 1 commit into from
Mar 18, 2015

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Mar 17, 2015

Fix issue where we ignored the self attribute of a security group rule.

To reproduce:

  1. plan and apply the config below:
provider "aws" {
  region = "us-west-2"
}

resource "aws_security_group" "tf_test_self" {
  name = "tf_test_self"
  description = "tf_test_self"
  vpc_id = "<a vpc id>"

  ingress {
    from_port = 0
    to_port = 65535
    protocol = "tcp"
    self = true
  }

  tags {
    Name = "tf_test_self"
  }
}
  1. After successfully creating, remove self = true from the ingress block
  2. Run plan again

Expected:

A diff

Actual:

nope-nope-nope

Discovered while investigating #508, so credit to them for discovery 😄

@catsby
Copy link
Contributor Author

catsby commented Mar 17, 2015

@phinze sanity check please :)

@phinze
Copy link
Contributor

phinze commented Mar 17, 2015

Sanity: intact. 🙆‍♀️

Thinking about backcompat here - this will result in a recalculation of every security group rule hash, but I think that's fine because refresh will rewrite the state before plan runs a diff.

Maybe double check this quickly by doing an apply with the old code, then making sure the plan with the new code does not try to nuke-and-replace the world?

If that checks out, then this is g2g.

@catsby
Copy link
Contributor Author

catsby commented Mar 18, 2015

Checked the plan results between master and this branch, confirmed no change detected so backward compatibility should be 👍 , merging

@catsby catsby closed this Mar 18, 2015
@catsby catsby reopened this Mar 18, 2015
catsby added a commit that referenced this pull request Mar 18, 2015
provider/aws: Fix issue with ignoring the 'self' attribute of a Security Group rule
@catsby catsby merged commit eadc44d into master Mar 18, 2015
@catsby catsby deleted the b-fix-ingress-self-ommission branch March 18, 2015 21:42
@ghost
Copy link

ghost commented May 4, 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 4, 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