-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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: Apply attribute waiter logic to enable_dns_hostnames and enable_dns_support attributes #17461
Conversation
e1a90fc
to
b8396c3
Compare
…s and enable_dns_support attributes Reference: #16697 This resource attribute has long been the cause of flakey acceptance testing across the codebase, such as: ``` === CONT TestAccAWSEMRInstanceGroup_InstanceCount TestAccAWSEMRInstanceGroup_InstanceCount: resource_aws_emr_instance_group_test.go:181: Step 1/3 error: After applying this test step, the plan was not empty. stdout: An execution plan has been generated and is shown below. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: ~ resource "aws_vpc" "main" { ~ enable_dns_hostnames = false -> true id = "vpc-0b7f7f7c1601ee31f" } Plan: 0 to add, 1 to change, 0 to destroy. --- FAIL: TestAccAWSEMRInstanceGroup_InstanceCount (809.62s) ``` Adding logic, similar to `SubnetMapCustomerOwnedIpOnLaunchUpdated` in #16676 can be used to ensure the attribute value has flipped correctly after calling the `ModifyVpcAttribute` API. This type of waiter logic will be documented in an upcoming Retries and Waiters section of the Contribution Guide. Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAWSVpc_AssignGeneratedIpv6CidrBlock (79.17s) --- PASS: TestAccAWSVpc_basic (33.46s) --- PASS: TestAccAWSVpc_bothDnsOptionsSet (42.70s) --- PASS: TestAccAWSVpc_classiclinkDnsSupportOptionSet (36.56s) --- PASS: TestAccAWSVpc_classiclinkOptionSet (34.72s) --- PASS: TestAccAWSVpc_coreMismatchedDiffs (27.89s) --- PASS: TestAccAWSVpc_DisabledDnsSupport (42.71s) --- PASS: TestAccAWSVpc_disappears (20.00s) --- PASS: TestAccAWSVpc_ignoreTags (58.33s) --- PASS: TestAccAWSVpc_tags (75.02s) --- PASS: TestAccAWSVpc_Tenancy (77.02s) --- PASS: TestAccAWSVpc_update (62.26s) --- PASS: TestAccDataSourceAwsVpc_basic (32.46s) --- PASS: TestAccDataSourceAwsVpc_ipv6Associated (33.00s) --- PASS: TestAccDataSourceAwsVpc_multipleCidr (56.10s) --- PASS: TestAccAWSEMRCluster_additionalInfo (407.52s) --- PASS: TestAccAWSEMRInstanceGroup_InstanceCount (881.55s) ``` Output from acceptance testing in AWS GovCloud (US): ``` --- FAIL: TestAccAWSVpc_classiclinkDnsSupportOptionSet (17.50s) # #17460 --- FAIL: TestAccAWSVpc_classiclinkOptionSet (18.04s) # #17460 --- PASS: TestAccAWSVpc_AssignGeneratedIpv6CidrBlock (95.03s) --- PASS: TestAccAWSVpc_basic (42.63s) --- PASS: TestAccAWSVpc_bothDnsOptionsSet (52.27s) --- PASS: TestAccAWSVpc_coreMismatchedDiffs (38.50s) --- PASS: TestAccAWSVpc_DisabledDnsSupport (53.42s) --- PASS: TestAccAWSVpc_disappears (28.33s) --- PASS: TestAccAWSVpc_ignoreTags (69.32s) --- PASS: TestAccAWSVpc_tags (90.39s) --- PASS: TestAccAWSVpc_Tenancy (94.96s) --- PASS: TestAccAWSVpc_update (72.18s) --- PASS: TestAccDataSourceAwsVpc_basic (32.39s) --- PASS: TestAccDataSourceAwsVpc_ipv6Associated (51.24s) --- PASS: TestAccDataSourceAwsVpc_multipleCidr (67.27s) --- PASS: TestAccAWSEMRCluster_additionalInfo (355.27s) --- PASS: TestAccAWSEMRInstanceGroup_InstanceCount (856.03s) ```
b8396c3
to
b022adb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🚀
Waiting on acceptance test results
@@ -216,17 +217,21 @@ func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { | |||
d.Set("ipv6_cidr_block", vpc.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock) | |||
} | |||
|
|||
attResp, err := awsVpcDescribeVpcAttribute("enableDnsSupport", aws.StringValue(vpc.VpcId), conn) | |||
enableDnsHostnames, err := finder.VpcAttribute(conn, aws.StringValue(vpc.VpcId), ec2.VpcAttributeNameEnableDnsHostnames) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I like the use of finder
functions here
Test results from yesterday:
|
This has been released in version 3.29.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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! |
Community Note
Closes #16697
This resource attribute has long been the cause of flakey acceptance testing across the codebase, such as:
Adding logic, similar to
SubnetMapCustomerOwnedIpOnLaunchUpdated
in #16676 can be used to ensure the attribute value has flipped correctly after calling theModifyVpcAttribute
API.This type of waiter logic will be documented in an upcoming Retries and Waiters section of the Contribution Guide.
Output from acceptance testing in AWS Commercial:
Output from acceptance testing in AWS GovCloud (US):