-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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_api_gateway_integration: Allow update of URI attributes #2834
resource/aws_api_gateway_integration: Allow update of URI attributes #2834
Conversation
…ing new resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mdlavin
This is looking good. Big 👍 for the explanation!
Just left a comment about adding a test case that covers the update, so that we ensure everything is fine.
Thanks!
@@ -370,6 +369,17 @@ func resourceAwsApiGatewayIntegrationUpdate(d *schema.ResourceData, meta interfa | |||
}) | |||
} | |||
|
|||
// The documentation https://docs.aws.amazon.com/apigateway/api-reference/link-relation/integration-update/ says | |||
// that uri changes are only supported for non-mock types. Because the uri value is not used in mock | |||
// resources, it means that the uri can always be updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a testcase that updates the URI?
I added a testcase that updated the URI, but I didn't see an obvious way to assert that an in-place update was used. I'm happy to update the testcase to assert the in-place update if you can point me at an example test that does that sort of assertion. |
@mdlavin I'm not even sure it's doable due to the nature of the API :/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work on that @mdlavin, looking very good! 🚀 👍
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAPIGatewayIntegration_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSAPIGatewayIntegration_ -timeout 120m
=== RUN TestAccAWSAPIGatewayIntegration_basic
--- PASS: TestAccAWSAPIGatewayIntegration_basic (124.34s)
=== RUN TestAccAWSAPIGatewayIntegration_cache_key_parameters
--- PASS: TestAccAWSAPIGatewayIntegration_cache_key_parameters (37.91s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 162.293s
This has been released in terraform-provider-aws version 1.7.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Instead of always forcing a new resource creation for URI changes (like a Lambda function version update), the integration:update action allows for in place updates.