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

resource/aws_apigatewayv2_deployment: Add triggers argument #13055

Merged
merged 1 commit into from May 1, 2020

Conversation

bflad
Copy link
Member

@bflad bflad commented Apr 28, 2020

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

Reference: #162
Closes #12961
Reference: #13054 (aws_api_gateway_deployment resource)
Reference: https://www.terraform.io/docs/providers/null/resource.html#triggers
Reference: https://www.terraform.io/docs/providers/random/#resource-quot-keepers-quot-
Reference: https://www.terraform.io/docs/providers/time/#resource-quot-triggers-quot-

Release note for CHANGELOG:

* resource/aws_apigatewayv2_deployment: Add `triggers` argument

Since it does not appear there will be functionality added anytime soon in the Terraform core to support resource configuration that automatically triggers resource recreation when referenced resources are updated, this introduces a triggers map argument similar to those utilized by the null, random, and time providers. This can be used by operators to automatically force a new resource (redeployment) using key/value criteria of their choosing. Its usage is fairly advanced, so caveats are added to the documentation.

We do not intend to add this class of argument to all Terraform AWS Provider resources due to its complexity and potentially awkward configuration, however, this is a pragmatic compromise for this particular resource which does not fit well into Terraform's usual provisioning model.

Output from acceptance testing:

--- PASS: TestAccAWSAPIGatewayV2Deployment_disappears (23.05s)
--- PASS: TestAccAWSAPIGatewayV2Deployment_basic (41.80s)
--- PASS: TestAccAWSAPIGatewayV2Deployment_Triggers (70.95s)

Reference: #12961
Reference: #13054 (aws_api_gateway_deployment resource)
Reference: https://www.terraform.io/docs/providers/null/resource.html#triggers
Reference: https://www.terraform.io/docs/providers/random/#resource-quot-keepers-quot-
Reference: https://www.terraform.io/docs/providers/time/#resource-quot-triggers-quot-

Since it does not appear there will be functionality added anytime soon in the Terraform core to support resource configuration that automatically triggers resource recreation when referenced resources are updated, this introduces a `triggers` map argument similar to those utilized by the `null`, `random`, and `time` providers. This can be used by operators to automatically force a new resource (redeployment) using key/value criteria of their choosing. Its usage is fairly advanced, so caveats are added to the documentation.

We do not intend to add this class of argument to all Terraform AWS Provider resources due to its complexity and potentially awkward configuration, however, this is a pragmatic compromise for this particular resource which does not fit well into Terraform's usual provisioning model.

Output from acceptance testing:

```
--- PASS: TestAccAWSAPIGatewayV2Deployment_disappears (23.05s)
--- PASS: TestAccAWSAPIGatewayV2Deployment_basic (41.80s)
--- PASS: TestAccAWSAPIGatewayV2Deployment_Triggers (70.95s)
```
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Apr 28, 2020
@bflad bflad requested a review from a team April 28, 2020 01:13
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. 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 Apr 28, 2020
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Apr 28, 2020
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: TestAccAWSAPIGatewayV2Deployment_disappears (12.89s)
--- PASS: TestAccAWSAPIGatewayV2Deployment_basic (26.01s)
--- PASS: TestAccAWSAPIGatewayV2Deployment_Triggers (32.94s)

@bflad bflad added this to the v2.61.0 milestone May 1, 2020
@bflad bflad merged commit 42e9992 into master May 1, 2020
@bflad bflad deleted the f-aws_apigatewayv2_deployment-triggers branch May 1, 2020 17:28
bflad added a commit that referenced this pull request May 1, 2020
@ghost
Copy link

ghost commented May 8, 2020

This has been released in version 2.61.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 Jun 1, 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!

@hashicorp hashicorp locked and limited conversation to collaborators Jun 1, 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. enhancement Requests to existing resources that expand the functionality or scope. 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.

aws_apigatewayv2_deployment not deploying
2 participants