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

New resource: aws_apigatewayv2_model #8912

Merged

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Jun 7, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Another resource for #7004.

Release note for CHANGELOG:

FEATURES:

* New Resource: aws_apigatewayv2_model

Output from acceptance testing:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGateway2Model_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAWSAPIGateway2Model_ -timeout 120m
=== RUN   TestAccAWSAPIGateway2Model_basic
=== PAUSE TestAccAWSAPIGateway2Model_basic
=== RUN   TestAccAWSAPIGateway2Model_AllAttributes
=== PAUSE TestAccAWSAPIGateway2Model_AllAttributes
=== CONT  TestAccAWSAPIGateway2Model_basic
=== CONT  TestAccAWSAPIGateway2Model_AllAttributes
--- PASS: TestAccAWSAPIGateway2Model_basic (24.81s)
--- PASS: TestAccAWSAPIGateway2Model_AllAttributes (59.71s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	59.810s

Currently based on #8842, will need to rebase once that PR is merged.

@ghost ghost added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/apigateway Issues and PRs that pertain to the apigateway service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jun 7, 2019
@ewbankkit ewbankkit changed the title [WIP] New resource: aws_api_gateway_v2_route [WIP] New resource: aws_api_gateway_v2_model Jun 7, 2019
@ewbankkit ewbankkit mentioned this pull request Jun 7, 2019
@ewbankkit ewbankkit force-pushed the issue-7004.aws_api_gateway_v2_model branch from 51f0ed3 to 9d494ab Compare June 11, 2019 14:43
@ewbankkit ewbankkit changed the title [WIP] New resource: aws_api_gateway_v2_model New resource: aws_api_gateway_v2_model Jun 11, 2019
@aeschright aeschright requested a review from a team June 21, 2019 19:04
@ewbankkit ewbankkit force-pushed the issue-7004.aws_api_gateway_v2_model branch from 1a31e17 to b422661 Compare July 1, 2019 16:33
@ghost ghost added service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. size/XXL Managed by automation to categorize the size of a PR. and removed size/XL Managed by automation to categorize the size of a PR. labels Jul 1, 2019
@ewbankkit
Copy link
Contributor Author

Rebased to track #8842 (comment).

@ewbankkit ewbankkit force-pushed the issue-7004.aws_api_gateway_v2_model branch from b422661 to ba8fb18 Compare July 2, 2019 17:29
@ewbankkit
Copy link
Contributor Author

Rebased to fix merge conflict.
Acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGateway2Model_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -parallel 20 -run=TestAccAWSAPIGateway2Model_ -timeout 120m
=== RUN   TestAccAWSAPIGateway2Model_basic
=== PAUSE TestAccAWSAPIGateway2Model_basic
=== RUN   TestAccAWSAPIGateway2Model_AllAttributes
=== PAUSE TestAccAWSAPIGateway2Model_AllAttributes
=== CONT  TestAccAWSAPIGateway2Model_basic
=== CONT  TestAccAWSAPIGateway2Model_AllAttributes
--- PASS: TestAccAWSAPIGateway2Model_basic (21.47s)
--- PASS: TestAccAWSAPIGateway2Model_AllAttributes (48.11s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	48.137s

@ewbankkit ewbankkit force-pushed the issue-7004.aws_api_gateway_v2_model branch from ba8fb18 to 6a21dc2 Compare July 26, 2019 20:18
@aeschright aeschright added the new-resource Introduces a new resource. label Aug 19, 2019
@ewbankkit ewbankkit force-pushed the issue-7004.aws_api_gateway_v2_model branch from a8172b8 to 4c80818 Compare March 9, 2020 22:23
@ewbankkit
Copy link
Contributor Author

Rebased to remove merge conflicts.
Re-ran acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Model_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Model_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Model_basic
=== PAUSE TestAccAWSAPIGatewayV2Model_basic
=== RUN   TestAccAWSAPIGatewayV2Model_disappears
=== PAUSE TestAccAWSAPIGatewayV2Model_disappears
=== RUN   TestAccAWSAPIGatewayV2Model_AllAttributes
=== PAUSE TestAccAWSAPIGatewayV2Model_AllAttributes
=== CONT  TestAccAWSAPIGatewayV2Model_basic
=== CONT  TestAccAWSAPIGatewayV2Model_AllAttributes
=== CONT  TestAccAWSAPIGatewayV2Model_disappears
--- PASS: TestAccAWSAPIGatewayV2Model_disappears (23.42s)
--- PASS: TestAccAWSAPIGatewayV2Model_basic (27.38s)
--- PASS: TestAccAWSAPIGatewayV2Model_AllAttributes (59.17s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	59.213s

@ewbankkit ewbankkit changed the title New resource: aws_api_gateway_v2_model New resource: aws_apigatewayv2_model Mar 13, 2020
@ewbankkit
Copy link
Contributor Author

After merge of #8842, incorporate all the feedback:

  • Change resource name to aws_apigatewayv2_blah; Rename source files
  • Add subcategory: "API Gateway v2 (WebSocket and HTTP APIs)" to documentation
  • Change function names to ApiGatewayV2
  • Add _disappears acceptance test
  • Use multierror in any test sweeper

@ewbankkit ewbankkit force-pushed the issue-7004.aws_api_gateway_v2_model branch from 4c80818 to 3a96ff7 Compare March 13, 2020 12:29
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/XXL Managed by automation to categorize the size of a PR. labels Mar 13, 2020
@ewbankkit ewbankkit force-pushed the issue-7004.aws_api_gateway_v2_model branch from 3a96ff7 to 78f1007 Compare March 13, 2020 12:31
@ewbankkit
Copy link
Contributor Author

Renamed resource to aws_apigatewayv2_model.
Re-ran acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSAPIGatewayV2Model_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayV2Model_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayV2Model_basic
=== PAUSE TestAccAWSAPIGatewayV2Model_basic
=== RUN   TestAccAWSAPIGatewayV2Model_disappears
=== PAUSE TestAccAWSAPIGatewayV2Model_disappears
=== RUN   TestAccAWSAPIGatewayV2Model_AllAttributes
=== PAUSE TestAccAWSAPIGatewayV2Model_AllAttributes
=== CONT  TestAccAWSAPIGatewayV2Model_basic
=== CONT  TestAccAWSAPIGatewayV2Model_AllAttributes
=== CONT  TestAccAWSAPIGatewayV2Model_disappears
--- PASS: TestAccAWSAPIGatewayV2Model_basic (27.39s)
--- PASS: TestAccAWSAPIGatewayV2Model_disappears (27.85s)
--- PASS: TestAccAWSAPIGatewayV2Model_AllAttributes (61.90s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	61.953s

@ewbankkit ewbankkit force-pushed the issue-7004.aws_api_gateway_v2_model branch from 8e64894 to 1148afd Compare March 16, 2020 20:53
@ewbankkit
Copy link
Contributor Author

This is now ready for review.

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: TestAccAWSAPIGatewayV2Model_disappears (9.08s)
--- PASS: TestAccAWSAPIGatewayV2Model_basic (16.30s)
--- PASS: TestAccAWSAPIGatewayV2Model_AllAttributes (27.84s)

resource.TestCheckResourceAttr(resourceName, "content_type", "application/json"),
resource.TestCheckResourceAttr(resourceName, "description", ""),
resource.TestCheckResourceAttr(resourceName, "name", rName),
resource.TestCheckResourceAttr(resourceName, "schema", schema),
Copy link
Contributor

Choose a reason for hiding this comment

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

The function testAccCheckResourceAttrEquivalentJSON can be used so that both JSON objects can be normalized

}
}
`
schema2 := `
Copy link
Contributor

Choose a reason for hiding this comment

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

For readability, please update the formatting on schema2 to match other JSON strings

@gdavison gdavison added this to the v2.57.0 milestone Apr 7, 2020
@ewbankkit ewbankkit force-pushed the issue-7004.aws_api_gateway_v2_model branch from 1148afd to d1f1d14 Compare April 7, 2020 21:42
@ewbankkit
Copy link
Contributor Author

Rebased to pick up testAccCheckResourceAttrEquivalentJSON and made suggested acceptance test changes.

@gdavison gdavison merged commit 1e5bbb7 into hashicorp:master Apr 8, 2020
gdavison added a commit that referenced this pull request Apr 8, 2020
@ewbankkit ewbankkit deleted the issue-7004.aws_api_gateway_v2_model branch April 9, 2020 10:05
@ghost
Copy link

ghost commented Apr 10, 2020

This has been released in version 2.57.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 May 9, 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 and limited conversation to collaborators May 9, 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. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/apigateway Issues and PRs that pertain to the apigateway service. 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
Development

Successfully merging this pull request may close these issues.

3 participants