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

resource/aws_vpc: Set ipv6_association_id and ipv6_cidr_block attributes as updated for assign_generated_ipv6_cidr_block updates #6721

Merged
merged 1 commit into from
Apr 26, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Dec 5, 2018

Fixes #6710

NOTE: This requires an upstream Terraform change: hashicorp/terraform#19548 Provider dependencies are good now. 😄

Previously:

--- FAIL: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate (36.59s)
    testing.go:538: Step 1 error: Error applying: 1 error occurred:
        	* aws_network_acl_rule.test: aws_network_acl_rule.test: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.

        Please include the following information in your report:

            Terraform Version: 0.11.9
            Resource ID: aws_network_acl_rule.test
            Mismatch reason: extra attributes: ipv6_cidr_block
            Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"egress":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "rule_number":*terraform.ResourceAttrDiff{Old:"", New:"150", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "protocol":*terraform.ResourceAttrDiff{Old:"", New:"tcp", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "rule_action":*terraform.ResourceAttrDiff{Old:"", New:"allow", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "from_port":*terraform.ResourceAttrDiff{Old:"", New:"22", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "to_port":*terraform.ResourceAttrDiff{Old:"", New:"22", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "network_acl_id":*terraform.ResourceAttrDiff{Old:"", New:"acl-0af5440f0c4b982b2", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
            Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"from_port":*terraform.ResourceAttrDiff{Old:"", New:"22", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "rule_action":*terraform.ResourceAttrDiff{Old:"", New:"allow", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "ipv6_cidr_block":*terraform.ResourceAttrDiff{Old:"", New:"2600:1f14:3b0:c100::/56", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "rule_number":*terraform.ResourceAttrDiff{Old:"", New:"150", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "egress":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "to_port":*terraform.ResourceAttrDiff{Old:"", New:"22", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "network_acl_id":*terraform.ResourceAttrDiff{Old:"", New:"acl-0af5440f0c4b982b2", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "protocol":*terraform.ResourceAttrDiff{Old:"", New:"tcp", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}

        Also include as much context as you can about your config, state, and the steps you performed to trigger this error.

With upstream updates:

--- PASS: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate (47.27s)

@bflad bflad added bug Addresses a defect in current functionality. upstream-terraform Addresses functionality related to the Terraform core binary. service/ec2 Issues and PRs that pertain to the ec2 service. labels Dec 5, 2018
@bflad bflad added this to the v2.0.0 milestone Dec 5, 2018
@ghost ghost added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/M Managed by automation to categorize the size of a PR. labels Dec 5, 2018
@bflad
Copy link
Contributor Author

bflad commented Dec 5, 2018

The upstream fix has been merged and will release with Terraform 0.12-alpha3 or 0.12-beta1. When the AWS provider's Terraform dependencies are updated with the mentioned update, we can verify this fix for real and hopefully get this in. 👍

@bflad bflad added terraform-0.12 and removed upstream-terraform Addresses functionality related to the Terraform core binary. labels Feb 23, 2019
@bflad bflad modified the milestones: v2.0.0, v2.1.0, v2.2.0, v2.3.0 Feb 23, 2019
@bflad bflad modified the milestones: v2.3.0, 0.12-post-support Mar 15, 2019
…tes as updated for assign_generated_ipv6_cidr_block updates

Previously:

```
--- FAIL: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate (36.59s)
    testing.go:538: Step 1 error: Error applying: 1 error occurred:
        	* aws_network_acl_rule.test: aws_network_acl_rule.test: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.

        Please include the following information in your report:

            Terraform Version: 0.11.9
            Resource ID: aws_network_acl_rule.test
            Mismatch reason: extra attributes: ipv6_cidr_block
            Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"egress":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "rule_number":*terraform.ResourceAttrDiff{Old:"", New:"150", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "protocol":*terraform.ResourceAttrDiff{Old:"", New:"tcp", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "rule_action":*terraform.ResourceAttrDiff{Old:"", New:"allow", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "from_port":*terraform.ResourceAttrDiff{Old:"", New:"22", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "to_port":*terraform.ResourceAttrDiff{Old:"", New:"22", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "network_acl_id":*terraform.ResourceAttrDiff{Old:"", New:"acl-0af5440f0c4b982b2", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
            Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"from_port":*terraform.ResourceAttrDiff{Old:"", New:"22", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "rule_action":*terraform.ResourceAttrDiff{Old:"", New:"allow", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "ipv6_cidr_block":*terraform.ResourceAttrDiff{Old:"", New:"2600:1f14:3b0:c100::/56", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "rule_number":*terraform.ResourceAttrDiff{Old:"", New:"150", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "egress":*terraform.ResourceAttrDiff{Old:"", New:"false", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "to_port":*terraform.ResourceAttrDiff{Old:"", New:"22", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "network_acl_id":*terraform.ResourceAttrDiff{Old:"", New:"acl-0af5440f0c4b982b2", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}, "protocol":*terraform.ResourceAttrDiff{Old:"", New:"tcp", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}

        Also include as much context as you can about your config, state, and the steps you performed to trigger this error.
```

Output from acceptance testing:

```
--- PASS: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate (51.24s)

--- PASS: TestAccAWSVpc_disappears (15.81s)
--- PASS: TestAccAWSVpc_coreMismatchedDiffs (24.90s)
--- PASS: TestAccAWSVpc_DisabledDnsSupport (30.17s)
--- PASS: TestAccAWSVpc_basic (30.31s)
--- PASS: TestAccAWSVpc_bothDnsOptionsSet (30.92s)
--- PASS: TestAccAWSVpc_classiclinkDnsSupportOptionSet (31.88s)
--- PASS: TestAccAWSVpc_classiclinkOptionSet (36.37s)
--- PASS: TestAccAWSVpc_update (42.77s)
--- PASS: TestAccAWSVpc_tags (48.91s)
--- PASS: TestAccAWSVpc_AssignGeneratedIpv6CidrBlock (68.32s)
--- PASS: TestAccAWSVpc_Tenancy (70.59s)
```
@bflad bflad force-pushed the b-aws_vpc-ipv6_cidr_block-setnewcomputed branch from 13e9b87 to 5e67876 Compare April 18, 2019 15:11
@bflad
Copy link
Contributor Author

bflad commented Apr 18, 2019

Rebased on Terraform 0.12 Provider SDK and passes testing 🎉

Output from acceptance testing:

--- PASS: TestAccAWSNetworkAclRule_ipv6VpcAssignGeneratedIpv6CidrBlockUpdate (51.24s)

--- PASS: TestAccAWSVpc_disappears (15.81s)
--- PASS: TestAccAWSVpc_coreMismatchedDiffs (24.90s)
--- PASS: TestAccAWSVpc_DisabledDnsSupport (30.17s)
--- PASS: TestAccAWSVpc_basic (30.31s)
--- PASS: TestAccAWSVpc_bothDnsOptionsSet (30.92s)
--- PASS: TestAccAWSVpc_classiclinkDnsSupportOptionSet (31.88s)
--- PASS: TestAccAWSVpc_classiclinkOptionSet (36.37s)
--- PASS: TestAccAWSVpc_update (42.77s)
--- PASS: TestAccAWSVpc_tags (48.91s)
--- PASS: TestAccAWSVpc_AssignGeneratedIpv6CidrBlock (68.32s)
--- PASS: TestAccAWSVpc_Tenancy (70.59s)

@bflad bflad requested a review from a team April 18, 2019 15:12
@bflad bflad modified the milestones: 0.12-post-support, v2.8.0 Apr 18, 2019
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM 👍 👍

@nywilken nywilken merged commit 502420d into master Apr 26, 2019
@nywilken nywilken deleted the b-aws_vpc-ipv6_cidr_block-setnewcomputed branch April 26, 2019 15:20
nywilken added a commit that referenced this pull request Apr 26, 2019
@nywilken
Copy link
Contributor

nywilken commented Apr 27, 2019

This has been released in version 2.8.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

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

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
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. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After modifying VPC to assign IPv6, using ipv6_cidr_block causes failure
2 participants