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 WAF IPSet descriptors removal on update #13766

Merged
merged 2 commits into from
Apr 24, 2017

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Apr 19, 2017

Closes #10403
Closes #10914

Before this patch we were never deleting descriptors from the IPSet except when deleting the whole IPSet. We were always just inserting more.

Fortunately because the Read() is implemented correctly we keep track of all descriptors, including the ones that user wanted to delete, but weren't deleted. That is how users can recover from the buggy state as we can just delete descriptors we know about.

TL;DR It should be sufficient to just re-apply after the bugfix was released to recover.

Test plan

make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSWafIPSet_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/19 14:05:36 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSWafIPSet_ -timeout 120m
=== RUN   TestAccAWSWafIPSet_basic
--- PASS: TestAccAWSWafIPSet_basic (58.86s)
=== RUN   TestAccAWSWafIPSet_disappears
--- PASS: TestAccAWSWafIPSet_disappears (60.86s)
=== RUN   TestAccAWSWafIPSet_changeNameForceNew
--- PASS: TestAccAWSWafIPSet_changeNameForceNew (119.98s)
=== RUN   TestAccAWSWafIPSet_changeDescriptors
--- PASS: TestAccAWSWafIPSet_changeDescriptors (97.32s)
=== RUN   TestAccAWSWafIPSet_noDescriptors
--- PASS: TestAccAWSWafIPSet_noDescriptors (36.35s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	373.406s

cc @yusukegoto I think the same bugs exists in your PR too, so feel free to cherry-pick from here.

btw. I believe there's very similar bug affecting byte match set which I plan to fix too.

Copy link
Contributor

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@radeksimko radeksimko merged commit d4dafbe into master Apr 24, 2017
@radeksimko radeksimko deleted the b-aws-waf-ipset-fix branch April 24, 2017 20:22
@ghost
Copy link

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