-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource/aws_subnet: Apply attribute waiter logic to map_public_ip_on…
…_launch attribute and tidy up attribute testing Reference: #16696 This resource attribute has long been the cause of flakey acceptance testing across the codebase, such as: ``` === CONT TestAccAWSLB_applicationLoadBalancer_updateHttp2 TestAccAWSLB_applicationLoadBalancer_updateHttp2: resource_aws_lb_test.go:522: 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: # aws_subnet.alb_test[0] will be updated in-place ~ resource "aws_subnet" "alb_test" { id = "subnet-088715d2b9827af18" ~ map_public_ip_on_launch = false -> true tags = { "Name" = "tf-acc-lb-basic-0" } # (7 unchanged attributes hidden) } Plan: 0 to add, 1 to change, 0 to destroy. ``` Adding logic, similar to `SubnetMapCustomerOwnedIpOnLaunchUpdated` in #16676 can be used to ensure the attribute value has flipped correctly after calling the `ModifySubnetAttribute` API. This attribute waiter setup will be added to a forthcoming Retries and Waiters section in the Contribution Guide. Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAWSLB_applicationLoadBalancer_updateHttp2 (302.23s) --- PASS: TestAccAWSSubnet_availabilityZoneId (37.76s) --- PASS: TestAccAWSSubnet_basic (35.50s) --- PASS: TestAccAWSSubnet_disappears (27.55s) --- PASS: TestAccAWSSubnet_enableIpv6 (88.46s) --- PASS: TestAccAWSSubnet_ignoreTags (57.96s) --- PASS: TestAccAWSSubnet_ipv6 (99.54s) --- PASS: TestAccAWSSubnet_MapPublicIpOnLaunch (99.92s) --- PASS: TestAccAWSSubnet_tags (84.05s) --- SKIP: TestAccAWSSubnet_CustomerOwnedIpv4Pool (7.36s) --- SKIP: TestAccAWSSubnet_MapCustomerOwnedIpOnLaunch (1.82s) --- SKIP: TestAccAWSSubnet_outpost (1.62s) ``` Output from acceptance testing in AWS GovCloud (US): ``` --- PASS: TestAccAWSLB_applicationLoadBalancer_updateHttp2 (310.96s) --- PASS: TestAccAWSSubnet_availabilityZoneId (42.49s) --- PASS: TestAccAWSSubnet_basic (39.27s) --- PASS: TestAccAWSSubnet_disappears (31.78s) --- PASS: TestAccAWSSubnet_enableIpv6 (100.77s) --- PASS: TestAccAWSSubnet_ignoreTags (67.49s) --- PASS: TestAccAWSSubnet_ipv6 (108.38s) --- PASS: TestAccAWSSubnet_MapPublicIpOnLaunch (109.87s) --- PASS: TestAccAWSSubnet_tags (95.24s) --- SKIP: TestAccAWSSubnet_CustomerOwnedIpv4Pool (7.11s) --- SKIP: TestAccAWSSubnet_MapCustomerOwnedIpOnLaunch (2.17s) --- SKIP: TestAccAWSSubnet_outpost (10.06s) ```
- Loading branch information
Showing
4 changed files
with
117 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters