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

service/apigateway: added operation_name attribute to API G. method #13282

Merged
merged 1 commit into from
Jan 13, 2021

Conversation

wperron
Copy link
Contributor

@wperron wperron commented May 12, 2020

This commit adds the operation_name attribute to the aws_api_gateway_method
resource. This attribute allows users to specify a custom function name to be
used when using API Gateway to generate an SDK. The attribute is already
supported by the AWS API and SDKs so there was really no reason not to include
it. It also made it a pretty straight forward change. This commit also includes:

  • test cases for the new attribute
  • updated documentation for the resource

Closes #13232

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

Release note for CHANGELOG:

added support for custom operation name on API Gateway methods

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSAPIGatewayMethod_customoperationname'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayMethod_customoperationname -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSAPIGatewayMethod_customoperationname
=== PAUSE TestAccAWSAPIGatewayMethod_customoperationname
=== CONT  TestAccAWSAPIGatewayMethod_customoperationname
--- PASS: TestAccAWSAPIGatewayMethod_customoperationname (56.06s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	56.089s
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/flatmap	0.025s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags	0.007s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/naming	0.077s [no tests to run]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/apigatewayv2/waiter	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/batch/equivalency	0.011s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/eks/token	0.033s [no tests to run]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/guardduty/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/iam/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/kinesisanalytics/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/kms/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/neptune/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/rds/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/servicediscovery/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/awsproviderlint	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/helper/awsprovidertype/keyvaluetags	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes	0.011s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/AWSAT001	0.050s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/AWSR001	0.039s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/AWSR002	0.052s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/fmtsprintfcallexpr	0.032s [no tests to run]
...

@wperron wperron requested a review from a team May 12, 2020 14:03
@ghost ghost added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/apigateway Issues and PRs that pertain to the apigateway service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels May 12, 2020
@wperron wperron force-pushed the master branch 4 times, most recently from d014343 to bbb053b Compare May 15, 2020 21:55
@wperron wperron closed this May 16, 2020
@wperron wperron reopened this May 16, 2020
@wperron wperron force-pushed the master branch 3 times, most recently from 0bff798 to 24070de Compare May 21, 2020 17:55
@wperron wperron force-pushed the master branch 4 times, most recently from cb8484c to 2539453 Compare June 1, 2020 11:46
@wperron wperron force-pushed the master branch 2 times, most recently from 8608abe to 1f2784d Compare June 25, 2020 14:39
This commit adds the `operation_name` attribute to the `aws_api_gateway_method`
resource. This attribute allows users to specify a custom function name to be
used when using API Gateway to generate an SDK. The attribute is already
supported by the AWS API and SDKs so there was really no reason not to include
it. It also made it a pretty straight forward change. This commit also includes:

* test cases for the new attribute
* updated documentation for the resource

Closes hashicorp#13232
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 13, 2021
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Thank you for submitting this, @wperron. After fixing up the merge conflict, looks good to me. 🚀

Output from acceptance testing:

--- PASS: TestAccAWSAPIGatewayMethod_disappears (14.37s)
--- PASS: TestAccAWSAPIGatewayMethod_cognitoauthorizer (47.44s)
--- PASS: TestAccAWSAPIGatewayMethod_customrequestvalidator (75.51s)
--- PASS: TestAccAWSAPIGatewayMethod_customauthorizer (108.34s)
--- PASS: TestAccAWSAPIGatewayMethod_customoperationname (223.20s)
--- PASS: TestAccAWSAPIGatewayMethod_basic (419.16s)

@bflad bflad added this to the v3.24.0 milestone Jan 13, 2021
@bflad bflad merged commit c73c7e2 into hashicorp:master Jan 13, 2021
@wperron wperron requested a review from a team as a code owner January 13, 2021 02:41
bflad added a commit that referenced this pull request Jan 13, 2021
@ghost
Copy link

ghost commented Jan 15, 2021

This has been released in version 3.24.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 Feb 12, 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 Feb 12, 2021
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. enhancement Requests to existing resources that expand the functionality or scope. service/apigateway Issues and PRs that pertain to the apigateway 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.

Add support for "operation_name" on the aws_api_gateway_method resource
2 participants