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_subnet: Apply attribute waiter logic to map_public_ip_on_launch attribute #16696

Closed
bflad opened this issue Dec 10, 2020 · 2 comments · Fixed by #17410
Closed

resource/aws_subnet: Apply attribute waiter logic to map_public_ip_on_launch attribute #16696

bflad opened this issue Dec 10, 2020 · 2 comments · Fixed by #17410
Assignees
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Dec 10, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

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.

Affected Resource

  • aws_subnet
@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Dec 10, 2020
@bflad bflad self-assigned this Feb 2, 2021
@bflad bflad added this to the Roadmap milestone Feb 2, 2021
bflad added a commit that referenced this issue Feb 2, 2021
…_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)
```
bflad added a commit that referenced this issue Feb 3, 2021
…_launch attribute and tidy up attribute testing (#17410)

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)
```
@github-actions github-actions bot modified the milestones: Roadmap, v3.27.0 Feb 3, 2021
@ghost
Copy link

ghost commented Feb 5, 2021

This has been released in version 3.27.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!

@ghost
Copy link

ghost commented Mar 5, 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 Mar 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
1 participant