-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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_vpn_connection: Prevent flipped tunnel1_*
and tunnel2_*
ordering when tunnel1_inside_cidr
, tunnel1_inside_ipv6_cidr
, or tunnel1_preshared_key
is configured
#19077
Conversation
…_*` ordering when `tunnel1_inside_cidr`, `tunnel1_inside_ipv6_cidr`, or `tunnel1_preshared_key` is configured Reference: #396 Reference: #3359 Reference: #4728 Reference: #5809 Reference: #11293 Previously (race condition of automatically assigned outside IP addresses): ``` === CONT TestAccAWSVpnConnection_tunnelOptions resource_aws_vpn_connection_test.go:210: Step 15/15 error: Check failed: Check 4/6 error: aws_vpn_connection.test: Attribute 'tunnel1_preshared_key' expected "12345678", got "abcdefgh" --- FAIL: TestAccAWSVpnConnection_tunnelOptions (738.28s) ``` Output from acceptance testing: ``` --- PASS: TestAccAWSVpnConnection_Tunnel1PresharedKey (251.02s) --- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (263.77s) --- PASS: TestAccAWSVpnConnection_Tunnel1InsideCidr (335.14s) --- PASS: TestAccAWSVpnConnection_tunnelOptions (342.30s) --- PASS: TestAccAWSVpnConnection_disappears (388.07s) --- PASS: TestAccAWSVpnConnection_tags (445.29s) --- PASS: TestAccAWSVpnConnection_basic (797.33s) --- PASS: TestAccAWSVpnConnection_withIpv6 (1235.35s) --- PASS: TestAccAWSVpnConnection_TransitGatewayID (1235.72s) --- PASS: TestAccAWSVpnConnection_withEnableAcceleration (1352.28s) --- PASS: TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr (1595.79s) ```
0217a90
to
e0ad75b
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.
LGTM.
Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSVpnConnection_' ACCTEST_PARALLELISM=4
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 4 -run=TestAccAWSVpnConnection_ -timeout 180m
=== RUN TestAccAWSVpnConnection_basic
=== PAUSE TestAccAWSVpnConnection_basic
=== RUN TestAccAWSVpnConnection_TransitGatewayID
=== PAUSE TestAccAWSVpnConnection_TransitGatewayID
=== RUN TestAccAWSVpnConnection_Tunnel1InsideCidr
=== PAUSE TestAccAWSVpnConnection_Tunnel1InsideCidr
=== RUN TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr
=== PAUSE TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr
=== RUN TestAccAWSVpnConnection_Tunnel1PresharedKey
=== PAUSE TestAccAWSVpnConnection_Tunnel1PresharedKey
=== RUN TestAccAWSVpnConnection_tunnelOptions
=== PAUSE TestAccAWSVpnConnection_tunnelOptions
=== RUN TestAccAWSVpnConnection_withoutStaticRoutes
=== PAUSE TestAccAWSVpnConnection_withoutStaticRoutes
=== RUN TestAccAWSVpnConnection_withEnableAcceleration
=== PAUSE TestAccAWSVpnConnection_withEnableAcceleration
=== RUN TestAccAWSVpnConnection_withIpv6
=== PAUSE TestAccAWSVpnConnection_withIpv6
=== RUN TestAccAWSVpnConnection_tags
=== PAUSE TestAccAWSVpnConnection_tags
=== RUN TestAccAWSVpnConnection_disappears
=== PAUSE TestAccAWSVpnConnection_disappears
=== CONT TestAccAWSVpnConnection_basic
=== CONT TestAccAWSVpnConnection_withoutStaticRoutes
=== CONT TestAccAWSVpnConnection_tags
=== CONT TestAccAWSVpnConnection_withIpv6
--- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (313.98s)
=== CONT TestAccAWSVpnConnection_withEnableAcceleration
--- PASS: TestAccAWSVpnConnection_tags (368.66s)
=== CONT TestAccAWSVpnConnection_disappears
--- PASS: TestAccAWSVpnConnection_basic (638.30s)
=== CONT TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr
--- PASS: TestAccAWSVpnConnection_withIpv6 (647.83s)
=== CONT TestAccAWSVpnConnection_tunnelOptions
--- PASS: TestAccAWSVpnConnection_tunnelOptions (361.17s)
=== CONT TestAccAWSVpnConnection_Tunnel1PresharedKey
--- PASS: TestAccAWSVpnConnection_disappears (666.44s)
=== CONT TestAccAWSVpnConnection_TransitGatewayID
--- PASS: TestAccAWSVpnConnection_withEnableAcceleration (917.25s)
=== CONT TestAccAWSVpnConnection_Tunnel1InsideCidr
--- PASS: TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr (607.22s)
--- PASS: TestAccAWSVpnConnection_Tunnel1PresharedKey (326.20s)
--- PASS: TestAccAWSVpnConnection_Tunnel1InsideCidr (372.33s)
--- PASS: TestAccAWSVpnConnection_TransitGatewayID (570.66s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 1608.676s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSVpnConnection_' ACCTEST_PARALLELISM=4
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 4 -run=TestAccAWSVpnConnection_ -timeout 180m
=== RUN TestAccAWSVpnConnection_basic
=== PAUSE TestAccAWSVpnConnection_basic
=== RUN TestAccAWSVpnConnection_TransitGatewayID
=== PAUSE TestAccAWSVpnConnection_TransitGatewayID
=== RUN TestAccAWSVpnConnection_Tunnel1InsideCidr
=== PAUSE TestAccAWSVpnConnection_Tunnel1InsideCidr
=== RUN TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr
=== PAUSE TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr
=== RUN TestAccAWSVpnConnection_Tunnel1PresharedKey
=== PAUSE TestAccAWSVpnConnection_Tunnel1PresharedKey
=== RUN TestAccAWSVpnConnection_tunnelOptions
=== PAUSE TestAccAWSVpnConnection_tunnelOptions
=== RUN TestAccAWSVpnConnection_withoutStaticRoutes
=== PAUSE TestAccAWSVpnConnection_withoutStaticRoutes
=== RUN TestAccAWSVpnConnection_withEnableAcceleration
=== PAUSE TestAccAWSVpnConnection_withEnableAcceleration
=== RUN TestAccAWSVpnConnection_withIpv6
=== PAUSE TestAccAWSVpnConnection_withIpv6
=== RUN TestAccAWSVpnConnection_tags
=== PAUSE TestAccAWSVpnConnection_tags
=== RUN TestAccAWSVpnConnection_disappears
=== PAUSE TestAccAWSVpnConnection_disappears
=== CONT TestAccAWSVpnConnection_basic
=== CONT TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr
=== CONT TestAccAWSVpnConnection_withoutStaticRoutes
=== CONT TestAccAWSVpnConnection_tunnelOptions
resource_aws_vpn_connection_test.go:295: Step 15/15 error: Error running apply: exit status 1
2021/04/23 11:20:38 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.0
Error: Error creating vpn connection: InvalidParameterValue: Invalid value specified for Phase1IntegrityAlgorithms.
status code: 400, request id: 1d006deb-a817-48de-babf-c4fd6aa0330d
on terraform_plugin_test.tf line 18, in resource "aws_vpn_connection" "test":
18: resource "aws_vpn_connection" "test" {
--- FAIL: TestAccAWSVpnConnection_tunnelOptions (27.32s)
=== CONT TestAccAWSVpnConnection_Tunnel1InsideCidr
--- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (202.48s)
=== CONT TestAccAWSVpnConnection_TransitGatewayID
--- PASS: TestAccAWSVpnConnection_Tunnel1InsideCidr (217.90s)
=== CONT TestAccAWSVpnConnection_Tunnel1PresharedKey
--- PASS: TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr (488.15s)
=== CONT TestAccAWSVpnConnection_withIpv6
--- PASS: TestAccAWSVpnConnection_basic (510.20s)
=== CONT TestAccAWSVpnConnection_tags
--- PASS: TestAccAWSVpnConnection_Tunnel1PresharedKey (322.34s)
=== CONT TestAccAWSVpnConnection_withEnableAcceleration
provider_test.go:1115: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
2021/04/23 11:29:57 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.0
Error: Error creating vpn connection: InvalidParameterValue: Invalid value specified for Accelerated VPN is not supported in this region.
status code: 400, request id: b11cb2dd-449a-4569-81ad-722a79f2454a
on terraform_plugin_test.tf line 11, in resource "aws_vpn_connection" "test":
11: resource "aws_vpn_connection" "test" {
--- PASS: TestAccAWSVpnConnection_TransitGatewayID (489.79s)
=== CONT TestAccAWSVpnConnection_disappears
--- PASS: TestAccAWSVpnConnection_tags (263.78s)
--- SKIP: TestAccAWSVpnConnection_withEnableAcceleration (227.78s)
--- PASS: TestAccAWSVpnConnection_disappears (227.50s)
--- PASS: TestAccAWSVpnConnection_withIpv6 (561.66s)
FAIL
FAIL github.com/terraform-providers/terraform-provider-aws/aws 1052.712s
FAIL
make: *** [testacc] Error 1
Unrelated errors.
…_*` ordering when `tunnel1_inside_cidr`, `tunnel1_inside_ipv6_cidr`, or `tunnel1_preshared_key` is configured (#19077) * resource/aws_vpn_connection: Prevent flipped `tunnel1_*` and `tunnel2_*` ordering when `tunnel1_inside_cidr`, `tunnel1_inside_ipv6_cidr`, or `tunnel1_preshared_key` is configured Reference: #396 Reference: #3359 Reference: #4728 Reference: #5809 Reference: #11293 Previously (race condition of automatically assigned outside IP addresses): ``` === CONT TestAccAWSVpnConnection_tunnelOptions resource_aws_vpn_connection_test.go:210: Step 15/15 error: Check failed: Check 4/6 error: aws_vpn_connection.test: Attribute 'tunnel1_preshared_key' expected "12345678", got "abcdefgh" --- FAIL: TestAccAWSVpnConnection_tunnelOptions (738.28s) ``` Output from acceptance testing: ``` --- PASS: TestAccAWSVpnConnection_Tunnel1PresharedKey (251.02s) --- PASS: TestAccAWSVpnConnection_withoutStaticRoutes (263.77s) --- PASS: TestAccAWSVpnConnection_Tunnel1InsideCidr (335.14s) --- PASS: TestAccAWSVpnConnection_tunnelOptions (342.30s) --- PASS: TestAccAWSVpnConnection_disappears (388.07s) --- PASS: TestAccAWSVpnConnection_tags (445.29s) --- PASS: TestAccAWSVpnConnection_basic (797.33s) --- PASS: TestAccAWSVpnConnection_withIpv6 (1235.35s) --- PASS: TestAccAWSVpnConnection_TransitGatewayID (1235.72s) --- PASS: TestAccAWSVpnConnection_withEnableAcceleration (1352.28s) --- PASS: TestAccAWSVpnConnection_Tunnel1InsideIpv6Cidr (1595.79s) ``` * tests/resource/aws_vpn_connection: Add nosemgrep comment for errant situation * resource/aws_vpn_connection: Fix comment typo
This has been released in version 3.38.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 pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #396
Closes #3359
Closes #5809
Closes #11293
Previously (race condition of automatically assigned outside IP addresses):
Output from acceptance testing: