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_integration: Specify required parameters on update #15894

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 #15861.

Release note for CHANGELOG:

resource/aws_apigatewayv2_integration: Correctly handle update of AWS service integrations

Output from acceptance testing:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Integration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Integration_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Integration_basicWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_basicWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_basicHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_basicHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_disappears
=== PAUSE TestAccAWSAPIGatewayV2Integration_disappears
=== RUN   TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_VpcLinkHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_VpcLinkHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== PAUSE TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== CONT  TestAccAWSAPIGatewayV2Integration_basicWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== CONT  TestAccAWSAPIGatewayV2Integration_VpcLinkHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_disappears
=== CONT  TestAccAWSAPIGatewayV2Integration_basicHttp
--- PASS: TestAccAWSAPIGatewayV2Integration_disappears (34.57s)
--- PASS: TestAccAWSAPIGatewayV2Integration_basicHttp (38.92s)
--- PASS: TestAccAWSAPIGatewayV2Integration_basicWebSocket (39.36s)
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaWebSocket (56.08s)
--- PASS: TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp (58.04s)
--- PASS: TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration (58.59s)
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaHttp (60.98s)
--- PASS: TestAccAWSAPIGatewayV2Integration_VpcLinkHttp (309.45s)
--- PASS: TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket (683.83s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	683.889s

@ewbankkit ewbankkit requested a review from a team October 28, 2020 18:14
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 28, 2020
@DrFaust92
Copy link
Collaborator

Tests are passing except for lambda tests where I get:

Error: error creating API Gateway v2 integration: BadRequestException: Invalid role ARN
  • TestAccAWSAPIGatewayV2Integration_LambdaHttp
  • TestAccAWSAPIGatewayV2Integration_LambdaWebSocket

@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Oct 29, 2020
…guration.

Acceptance test output:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Integration_Lambda'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Integration_Lambda -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_LambdaHttp
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaHttp (38.99s)
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaWebSocket (45.03s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	45.085s
$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== PAUSE TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== CONT  TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
--- PASS: TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration (37.63s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	37.689s
@ewbankkit ewbankkit force-pushed the b-aws_apigatewayv2_integration-request_parameters-update-for-AWS-service branch from 140420c to 2bb5271 Compare October 29, 2020 13:57
@ewbankkit
Copy link
Contributor Author

@DrFaust92 The failures are probably due to the permissions of the account you used to verify. I changed the 2 Lambda tests to use an explicit resource permission which is now configured in the test.
Please retest.

@DrFaust92
Copy link
Collaborator

LGTM:

--- PASS: TestAccAWSAPIGatewayV2Integration_disappears (37.61s)
--- PASS: TestAccAWSAPIGatewayV2Integration_basicHttp (45.59s)
--- PASS: TestAccAWSAPIGatewayV2Integration_basicWebSocket (63.01s)
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaHttp (73.07s)
--- PASS: TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp (73.38s)
--- PASS: TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration (79.45s)
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaWebSocket (85.31s)
--- PASS: TestAccAWSAPIGatewayV2Integration_VpcLinkHttp (345.25s)
--- PASS: TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket (762.52s)

@breathingdust
Copy link
Member

LGTM 🚀 Thanks @ewbankkit

Verified Acceptance Tests in Commercial (us-west-2)

make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Integration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Integration_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Integration_basicWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_basicWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_basicHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_basicHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_disappears
=== PAUSE TestAccAWSAPIGatewayV2Integration_disappears
=== RUN   TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_VpcLinkHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_VpcLinkHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== PAUSE TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== CONT  TestAccAWSAPIGatewayV2Integration_basicWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== CONT  TestAccAWSAPIGatewayV2Integration_VpcLinkHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_disappears
=== CONT  TestAccAWSAPIGatewayV2Integration_basicHttp
2020/10/29 10:56:27 [DEBUG] Trying to get account information via sts:GetCallerIdentity
--- PASS: TestAccAWSAPIGatewayV2Integration_disappears (17.27s)
--- PASS: TestAccAWSAPIGatewayV2Integration_basicHttp (19.62s)
--- PASS: TestAccAWSAPIGatewayV2Integration_basicWebSocket (19.69s)
--- PASS: TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration (35.43s)
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaHttp (37.97s)
--- PASS: TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp (40.89s)
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaWebSocket (44.64s)
--- PASS: TestAccAWSAPIGatewayV2Integration_VpcLinkHttp (336.89s)
--- PASS: TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket (653.69s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	655.146s

Verified Acceptance Tests in GovCloud (us-gov-west-1)

make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Integration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Integration_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Integration_basicWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_basicWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_basicHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_basicHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_disappears
=== PAUSE TestAccAWSAPIGatewayV2Integration_disappears
=== RUN   TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket
=== RUN   TestAccAWSAPIGatewayV2Integration_VpcLinkHttp
=== PAUSE TestAccAWSAPIGatewayV2Integration_VpcLinkHttp
=== RUN   TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== PAUSE TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== CONT  TestAccAWSAPIGatewayV2Integration_basicWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_LambdaHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration
=== CONT  TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_VpcLinkHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp
=== CONT  TestAccAWSAPIGatewayV2Integration_LambdaWebSocket
=== CONT  TestAccAWSAPIGatewayV2Integration_disappears
=== CONT  TestAccAWSAPIGatewayV2Integration_basicHttp
--- PASS: TestAccAWSAPIGatewayV2Integration_disappears (14.29s)
--- PASS: TestAccAWSAPIGatewayV2Integration_basicWebSocket (15.68s)
--- PASS: TestAccAWSAPIGatewayV2Integration_basicHttp (16.25s)
--- PASS: TestAccAWSAPIGatewayV2Integration_IntegrationTypeHttp (25.51s)
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaHttp (30.54s)
--- PASS: TestAccAWSAPIGatewayV2Integration_LambdaWebSocket (35.90s)
--- PASS: TestAccAWSAPIGatewayV2Integration_AwsServiceIntegration (43.09s)
--- PASS: TestAccAWSAPIGatewayV2Integration_VpcLinkHttp (291.80s)
--- PASS: TestAccAWSAPIGatewayV2Integration_VpcLinkWebSocket (650.51s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	652.084s

@breathingdust breathingdust added this to the v3.13.0 milestone Oct 29, 2020
@breathingdust breathingdust merged commit 1e6951d into hashicorp:master Oct 29, 2020
breathingdust added a commit that referenced this pull request Oct 29, 2020
@ewbankkit ewbankkit deleted the b-aws_apigatewayv2_integration-request_parameters-update-for-AWS-service branch October 29, 2020 18:26
@ghost
Copy link

ghost commented Oct 29, 2020

This has been released in version 3.13.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 Nov 29, 2020

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 Nov 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. size/L 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
Development

Successfully merging this pull request may close these issues.

api gateway v2 integration: Invalid integration URI specified when renaming a SQS queue
3 participants