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_api: Add 'disable_execute_api_endpoint' attribute #15250

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

Relates #15220.
Relates #13527.
Relates #14601.

Release note for CHANGELOG:

resource/aws_apigatewayv2_api: Add `disable_execute_api_endpoint` attribute

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayV2Api_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Api_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Api_basicWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Api_basicWebSocket
=== RUN   TestAccAWSAPIGatewayV2Api_basicHttp
=== PAUSE TestAccAWSAPIGatewayV2Api_basicHttp
=== RUN   TestAccAWSAPIGatewayV2Api_disappears
=== PAUSE TestAccAWSAPIGatewayV2Api_disappears
=== RUN   TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== RUN   TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== PAUSE TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== RUN   TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== PAUSE TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== RUN   TestAccAWSAPIGatewayV2Api_Tags
=== PAUSE TestAccAWSAPIGatewayV2Api_Tags
=== RUN   TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== PAUSE TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== RUN   TestAccAWSAPIGatewayV2Api_QuickCreate
=== PAUSE TestAccAWSAPIGatewayV2Api_QuickCreate
=== CONT  TestAccAWSAPIGatewayV2Api_basicWebSocket
=== CONT  TestAccAWSAPIGatewayV2Api_QuickCreate
=== CONT  TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== CONT  TestAccAWSAPIGatewayV2Api_Tags
=== CONT  TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== CONT  TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi
=== CONT  TestAccAWSAPIGatewayV2Api_disappears
=== CONT  TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== CONT  TestAccAWSAPIGatewayV2Api_basicHttp
=== CONT  TestAccAWSAPIGatewayV2Api_disappears
    resource_aws_apigatewayv2_api_test.go:151: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSAPIGatewayV2Api_disappears (35.17s)
--- PASS: TestAccAWSAPIGatewayV2Api_basicWebSocket (48.38s)
--- PASS: TestAccAWSAPIGatewayV2Api_QuickCreate (50.27s)y
--- PASS: TestAccAWSAPIGatewayV2Api_basicHttp (80.44s)
--- PASS: TestAccAWSAPIGatewayV2Api_Tags (81.27s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi (85.63s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithTags (89.80s)
--- PASS: TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields (91.56s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration (117.17s)
--- PASS: TestAccAWSAPIGatewayV2Api_CorsConfiguration (117.81s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket (118.94s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesHttp (130.87s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	130.934s

Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayV2Api_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Api_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Api_basicWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Api_basicWebSocket
=== RUN   TestAccAWSAPIGatewayV2Api_basicHttp
=== PAUSE TestAccAWSAPIGatewayV2Api_basicHttp
=== RUN   TestAccAWSAPIGatewayV2Api_disappears
=== PAUSE TestAccAWSAPIGatewayV2Api_disappears
=== RUN   TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== RUN   TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== PAUSE TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== RUN   TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== PAUSE TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== RUN   TestAccAWSAPIGatewayV2Api_Tags
=== PAUSE TestAccAWSAPIGatewayV2Api_Tags
=== RUN   TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== PAUSE TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== RUN   TestAccAWSAPIGatewayV2Api_QuickCreate
=== PAUSE TestAccAWSAPIGatewayV2Api_QuickCreate
=== CONT  TestAccAWSAPIGatewayV2Api_basicWebSocket
=== CONT  TestAccAWSAPIGatewayV2Api_QuickCreate
=== CONT  TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== CONT  TestAccAWSAPIGatewayV2Api_Tags
=== CONT  TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== CONT  TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi
=== CONT  TestAccAWSAPIGatewayV2Api_disappears
=== CONT  TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== CONT  TestAccAWSAPIGatewayV2Api_basicHttp
2020/09/20 17:00:23 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020/09/20 17:00:23 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
=== CONT  TestAccAWSAPIGatewayV2Api_disappears
    resource_aws_apigatewayv2_api_test.go:151: [INFO] Got non-empty plan, as expected
2020/09/20 17:00:52 [DEBUG] Trying to get account information via sts:GetCallerIdentity
--- PASS: TestAccAWSAPIGatewayV2Api_disappears (35.17s)
2020/09/20 17:00:53 [INFO] AWS Auth provider used: "EnvProvider"
2020/09/20 17:00:53 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2020/09/20 17:01:02 [DEBUG] Updating API Gateway v2 API: {
  ApiId: "h82mccfioi",
  ApiKeySelectionExpression: "$request.header.x-api-key",
  Description: "",
  DisableExecuteApiEndpoint: false,
  RouteSelectionExpression: "$request.body.action",
  Version: ""
}
--- PASS: TestAccAWSAPIGatewayV2Api_basicWebSocket (48.38s)
--- PASS: TestAccAWSAPIGatewayV2Api_QuickCreate (50.27s)
2020/09/20 17:01:19 [DEBUG] Trying to get account information via sts:GetCallerIdentity
--- PASS: TestAccAWSAPIGatewayV2Api_basicHttp (80.44s)
--- PASS: TestAccAWSAPIGatewayV2Api_Tags (81.27s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi (85.63s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithTags (89.80s)
--- PASS: TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields (91.56s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration (117.17s)
--- PASS: TestAccAWSAPIGatewayV2Api_CorsConfiguration (117.81s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket (118.94s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesHttp (130.87s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	130.934s
@ewbankkit ewbankkit requested a review from a team September 21, 2020 18:59
@ghost ghost added size/M 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 Sep 21, 2020
Copy link
Collaborator

@DrFaust92 DrFaust92 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: TestAccAWSAPIGatewayV2Api_basicHttp (42.92s)
--- PASS: TestAccAWSAPIGatewayV2Api_disappears (29.39s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket (121.14s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesHttp (122.72s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi (79.28s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithTags (86.89s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration (110.87s)
--- PASS: TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields (83.90s)
--- PASS: TestAccAWSAPIGatewayV2Api_Tags (69.01s)
--- PASS: TestAccAWSAPIGatewayV2Api_CorsConfiguration (96.15s)
--- PASS: TestAccAWSAPIGatewayV2Api_QuickCreate (45.92s)

@breathingdust
Copy link
Member

LGTM! 🚀 Thanks @ewbankkit

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

make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayV2Api_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Api_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Api_basicWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Api_basicWebSocket
=== RUN   TestAccAWSAPIGatewayV2Api_basicHttp
=== PAUSE TestAccAWSAPIGatewayV2Api_basicHttp
=== RUN   TestAccAWSAPIGatewayV2Api_disappears
=== PAUSE TestAccAWSAPIGatewayV2Api_disappears
=== RUN   TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== RUN   TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== PAUSE TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== RUN   TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== PAUSE TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== RUN   TestAccAWSAPIGatewayV2Api_Tags
=== PAUSE TestAccAWSAPIGatewayV2Api_Tags
=== RUN   TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== PAUSE TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== RUN   TestAccAWSAPIGatewayV2Api_QuickCreate
=== PAUSE TestAccAWSAPIGatewayV2Api_QuickCreate
=== CONT  TestAccAWSAPIGatewayV2Api_basicWebSocket
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== CONT  TestAccAWSAPIGatewayV2Api_disappears
=== CONT  TestAccAWSAPIGatewayV2Api_QuickCreate
=== CONT  TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== CONT  TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== CONT  TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== CONT  TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== CONT  TestAccAWSAPIGatewayV2Api_Tags
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi
=== CONT  TestAccAWSAPIGatewayV2Api_basicHttp
2020/09/23 08:52:35 [DEBUG] Trying to get account information via sts:GetCallerIdentity
=== CONT  TestAccAWSAPIGatewayV2Api_disappears
    resource_aws_apigatewayv2_api_test.go:151: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSAPIGatewayV2Api_disappears (13.25s)
--- PASS: TestAccAWSAPIGatewayV2Api_basicHttp (16.83s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi (31.05s)
--- PASS: TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields (34.68s)
--- PASS: TestAccAWSAPIGatewayV2Api_CorsConfiguration (37.41s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration (43.68s)
--- PASS: TestAccAWSAPIGatewayV2Api_basicWebSocket (46.02s)
--- PASS: TestAccAWSAPIGatewayV2Api_QuickCreate (49.50s)
--- PASS: TestAccAWSAPIGatewayV2Api_Tags (59.71s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithTags (66.16s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket (75.76s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesHttp (77.82s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	84.583s

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

make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayV2Api_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Api_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Api_basicWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Api_basicWebSocket
=== RUN   TestAccAWSAPIGatewayV2Api_basicHttp
=== PAUSE TestAccAWSAPIGatewayV2Api_basicHttp
=== RUN   TestAccAWSAPIGatewayV2Api_disappears
=== PAUSE TestAccAWSAPIGatewayV2Api_disappears
=== RUN   TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== PAUSE TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== RUN   TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== PAUSE TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== RUN   TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== PAUSE TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== RUN   TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== PAUSE TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== RUN   TestAccAWSAPIGatewayV2Api_Tags
=== PAUSE TestAccAWSAPIGatewayV2Api_Tags
=== RUN   TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== PAUSE TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== RUN   TestAccAWSAPIGatewayV2Api_QuickCreate
=== PAUSE TestAccAWSAPIGatewayV2Api_QuickCreate
=== CONT  TestAccAWSAPIGatewayV2Api_basicWebSocket
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration
=== CONT  TestAccAWSAPIGatewayV2Api_QuickCreate
=== CONT  TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket
=== CONT  TestAccAWSAPIGatewayV2Api_CorsConfiguration
=== CONT  TestAccAWSAPIGatewayV2Api_Tags
=== CONT  TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields
=== CONT  TestAccAWSAPIGatewayV2Api_AllAttributesHttp
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi_WithTags
=== CONT  TestAccAWSAPIGatewayV2Api_Openapi
=== CONT  TestAccAWSAPIGatewayV2Api_disappears
=== CONT  TestAccAWSAPIGatewayV2Api_basicHttp
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithTags (26.94s)
=== CONT  TestAccAWSAPIGatewayV2Api_disappears
    resource_aws_apigatewayv2_api_test.go:151: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSAPIGatewayV2Api_disappears (40.35s)
2020/09/23 08:56:20 [DEBUG] Trying to get account information via sts:GetCallerIdentity
--- PASS: TestAccAWSAPIGatewayV2Api_basicWebSocket (41.92s)
--- PASS: TestAccAWSAPIGatewayV2Api_basicHttp (42.42s)
2020/09/23 08:56:22 [DEBUG] Trying to get account information via sts:GetCallerIdentity
--- PASS: TestAccAWSAPIGatewayV2Api_QuickCreate (44.51s)
--- PASS: TestAccAWSAPIGatewayV2Api_Tags (51.33s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi (54.83s)
--- PASS: TestAccAWSAPIGatewayV2Api_OpenapiWithMoreFields (57.37s)
--- PASS: TestAccAWSAPIGatewayV2Api_CorsConfiguration (58.93s)
--- PASS: TestAccAWSAPIGatewayV2Api_Openapi_WithCorsConfiguration (65.78s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesHttp (65.84s)
--- PASS: TestAccAWSAPIGatewayV2Api_AllAttributesWebSocket (66.02s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	72.454s

@breathingdust breathingdust added this to the v3.8.0 milestone Sep 23, 2020
@breathingdust breathingdust merged commit 066bc73 into hashicorp:master Sep 23, 2020
breathingdust added a commit that referenced this pull request Sep 23, 2020
@ewbankkit ewbankkit deleted the f-aws_apigatewayv2_api-disable-execute-api-endpoint branch September 23, 2020 16:35
@ghost
Copy link

ghost commented Sep 24, 2020

This has been released in version 3.8.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 Oct 23, 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 Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. size/M 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.

3 participants