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: revoke_rules_on_delete conflict with 'terraform plan' #2329

Closed
carmas opened this issue Nov 16, 2017 · 5 comments
Closed
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@carmas
Copy link

carmas commented Nov 16, 2017

Version 1.2.0 (released October 31, 2017)

In this version, a new feature was added:
-resource/aws_security_group: Add revoke_rules_on_delete option to force a security

Problem:
-When you import a security group into terraform, the parameter 'revoke_rules_on_delete' is not imported into terraform.tfstate. Let's assume one imported, say:

$ terraform import aws_security_group.sg-1 sg-234xxxx12

-If after importing one runs 'terraform plan' the following change is reported:

$terraform plan
.....
.....
~ aws_security_group.sg-1
revoke_rules_on_delete: "" => "false"

There is no trace of revoke_rules_on_delete in terraform.tfstate.
I tried to specify the value explicitly in the main.tf file with both 'true' and 'false', and even an empty string (""). In all cases the plan is to introduce a change.

(brute force): to validate/test, I manually edited terraform.tfstate and added:

"revoke_rules_on_delete": "false",

then 'terraform plan' passed with 'No changes'

Workaround (until bug is fixed):

For now, I pinned the provider plugin to the previous version, (using which the problem does not manifest), in main.tf:

provider "aws" {
version = "~> 1.1.0"
.....
......
}

So essentially, it looks like 'terraform import' should explicitly import the value of the parameter revoke_rules_on_delete explicitly as 'true' or 'false'

@paddycarver paddycarver added the bug Addresses a defect in current functionality. label Nov 21, 2017
@radeksimko radeksimko added the service/ec2 Issues and PRs that pertain to the ec2 service. label Jan 28, 2018
@klaus993
Copy link

We have the same problem every time with two security groups we have instanced. Is there any progress with this? Every time we change something in that directory we end up having to edit terraform.tfstate manually.

@kaylacrowder
Copy link

Still getting this issue.
revoke_rules_on_delete: "" => "false"

@pokle
Copy link

pokle commented Dec 16, 2018

Same issue with aws provider 1.51.
2018's nearly over :)

@github-actions
Copy link

github-actions bot commented Dec 5, 2020

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Dec 5, 2020
@github-actions github-actions bot closed this as completed Jan 4, 2021
@ghost
Copy link

ghost commented Feb 4, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 4, 2021
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. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

6 participants