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

r/aws_apigatewayv2_domain_name: Always send domain name configuration on update of mutual TLS configuration #18351

Merged

Conversation

ewbankkit
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Closes #18312.

Output from acceptance testing:

$ ACM_CERTIFICATE_ROOT_DOMAIN=<> make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayV2DomainName_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2DomainName_ -timeout 180m
=== RUN   TestAccAWSAPIGatewayV2DomainName_basic
=== PAUSE TestAccAWSAPIGatewayV2DomainName_basic
=== RUN   TestAccAWSAPIGatewayV2DomainName_disappears
=== PAUSE TestAccAWSAPIGatewayV2DomainName_disappears
=== RUN   TestAccAWSAPIGatewayV2DomainName_Tags
=== PAUSE TestAccAWSAPIGatewayV2DomainName_Tags
=== RUN   TestAccAWSAPIGatewayV2DomainName_UpdateCertificate
=== PAUSE TestAccAWSAPIGatewayV2DomainName_UpdateCertificate
=== RUN   TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
=== PAUSE TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
=== CONT  TestAccAWSAPIGatewayV2DomainName_basic
=== CONT  TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
=== CONT  TestAccAWSAPIGatewayV2DomainName_UpdateCertificate
=== CONT  TestAccAWSAPIGatewayV2DomainName_Tags
=== CONT  TestAccAWSAPIGatewayV2DomainName_disappears
--- PASS: TestAccAWSAPIGatewayV2DomainName_Tags (52.69s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_disappears (121.05s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication (263.95s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_basic (347.90s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_UpdateCertificate (469.99s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	470.492s

Acceptance test output:

$ ACM_CERTIFICATE_ROOT_DOMAIN=<> make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayV2DomainName_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2DomainName_ -timeout 180m
=== RUN   TestAccAWSAPIGatewayV2DomainName_basic
=== PAUSE TestAccAWSAPIGatewayV2DomainName_basic
=== RUN   TestAccAWSAPIGatewayV2DomainName_disappears
=== PAUSE TestAccAWSAPIGatewayV2DomainName_disappears
=== RUN   TestAccAWSAPIGatewayV2DomainName_Tags
=== PAUSE TestAccAWSAPIGatewayV2DomainName_Tags
=== RUN   TestAccAWSAPIGatewayV2DomainName_UpdateCertificate
=== PAUSE TestAccAWSAPIGatewayV2DomainName_UpdateCertificate
=== RUN   TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
=== PAUSE TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
=== CONT  TestAccAWSAPIGatewayV2DomainName_basic
=== CONT  TestAccAWSAPIGatewayV2DomainName_UpdateCertificate
=== CONT  TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
=== CONT  TestAccAWSAPIGatewayV2DomainName_Tags
=== CONT  TestAccAWSAPIGatewayV2DomainName_disappears
--- PASS: TestAccAWSAPIGatewayV2DomainName_disappears (24.80s)
=== CONT  TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
    resource_aws_apigatewayv2_domain_name_test.go:279: Step 2/4 error: Error running apply: exit status 1
        2021/03/22 17:15:26 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.13.0

        Error: error updating API Gateway v2 domain name (tf-acc-01xy3s6uqmlgijxzyxaupimtxq7sqdaldcnzlpdqz8.ewbankkit.com): BadRequestException: Invalid input. Expected one domain name configuration

          on terraform_plugin_test.tf line 62, in resource "aws_apigatewayv2_domain_name" "test":
          62: resource "aws_apigatewayv2_domain_name" "test" {

--- FAIL: TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication (194.33s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_basic (210.10s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_Tags (296.94s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_UpdateCertificate (430.93s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	431.633s
FAIL
GNUmakefile:27: recipe for target 'testacc' failed
make: *** [testacc] Error 1
Acceptance test output:

$ TEST=./aws SWEEP=us-west-2 SWEEPARGS=-sweep-run=aws_apigatewayv2_domain_name make sweep
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./aws -v -sweep=us-west-2 -sweep-run=aws_apigatewayv2_domain_name -timeout 60m
2021/03/23 10:24:20 [DEBUG] Running Sweepers for region (us-west-2):
2021/03/23 10:24:20 [DEBUG] Running Sweeper (aws_apigatewayv2_domain_name) in region (us-west-2)
2021/03/23 10:24:20 [INFO] AWS Auth provider used: "EnvProvider"
2021/03/23 10:24:20 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/03/23 10:24:21 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/03/23 10:24:22 [DEBUG] Deleting API Gateway v2 domain name (testing1.ewbankkit.com)
2021/03/23 10:24:23 Sweeper Tests ran successfully:
	- aws_apigatewayv2_domain_name
ok  	github.com/terraform-providers/terraform-provider-aws/aws	2.324s
… on update of mutual TLS configuration.

Acceptance test output:

$ ACM_CERTIFICATE_ROOT_DOMAIN=ewbankkit.com make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayV2DomainName_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2DomainName_ -timeout 180m
=== RUN   TestAccAWSAPIGatewayV2DomainName_basic
=== PAUSE TestAccAWSAPIGatewayV2DomainName_basic
=== RUN   TestAccAWSAPIGatewayV2DomainName_disappears
=== PAUSE TestAccAWSAPIGatewayV2DomainName_disappears
=== RUN   TestAccAWSAPIGatewayV2DomainName_Tags
=== PAUSE TestAccAWSAPIGatewayV2DomainName_Tags
=== RUN   TestAccAWSAPIGatewayV2DomainName_UpdateCertificate
=== PAUSE TestAccAWSAPIGatewayV2DomainName_UpdateCertificate
=== RUN   TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
=== PAUSE TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
=== CONT  TestAccAWSAPIGatewayV2DomainName_basic
=== CONT  TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication
=== CONT  TestAccAWSAPIGatewayV2DomainName_UpdateCertificate
=== CONT  TestAccAWSAPIGatewayV2DomainName_Tags
=== CONT  TestAccAWSAPIGatewayV2DomainName_disappears
--- PASS: TestAccAWSAPIGatewayV2DomainName_Tags (52.69s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_disappears (121.05s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication (263.95s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_basic (347.90s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_UpdateCertificate (469.99s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	470.492s
@ewbankkit ewbankkit requested a review from a team as a code owner March 23, 2021 16:24
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Mar 23, 2021
@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Mar 23, 2021
@gdavison gdavison assigned gdavison and unassigned DrFaust92 Mar 25, 2021
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

--- PASS: TestAccAWSAPIGatewayV2DomainName_MutualTlsAuthentication (214.86s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_basic (77.83s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_disappears (112.76s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_Tags (537.96s)
--- PASS: TestAccAWSAPIGatewayV2DomainName_UpdateCertificate (587.26s)

@gdavison gdavison merged commit 043fa9d into hashicorp:main Mar 25, 2021
@github-actions github-actions bot added this to the v3.34.0 milestone Mar 25, 2021
@ghost
Copy link

ghost commented Mar 26, 2021

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

@ewbankkit ewbankkit deleted the b-aws_apigatewayv2_domain_name-update branch March 26, 2021 11:51
@ghost
Copy link

ghost commented Apr 25, 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 Apr 25, 2021
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. documentation Introduces or discusses updates to documentation. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. size/XL 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
3 participants