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_api_gateway_integration: Allow update of URI attributes #2834

Merged
merged 2 commits into from
Jan 10, 2018

Conversation

mdlavin
Copy link
Contributor

@mdlavin mdlavin commented Jan 3, 2018

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.

@radeksimko radeksimko added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 3, 2018
Copy link
Contributor

@Ninir Ninir left a 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
Copy link
Contributor

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?

@Ninir Ninir added the waiting-response Maintainers are waiting on response from community or contributor. label Jan 5, 2018
@mdlavin
Copy link
Contributor Author

mdlavin commented Jan 9, 2018

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.

@Ninir
Copy link
Contributor

Ninir commented Jan 10, 2018

@mdlavin I'm not even sure it's doable due to the nature of the API :/
Will merge as is for this reason, after running the tests. THanks!

Copy link
Contributor

@Ninir Ninir left a 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

@Ninir Ninir changed the title Allow updating API Gateway integration URI attributes resource/aws_api_gateway_integration: Allow update of URI attributes Jan 10, 2018
@Ninir Ninir merged commit 6838bdc into hashicorp:master Jan 10, 2018
@bflad bflad added this to the v1.7.0 milestone Jan 12, 2018
@bflad
Copy link
Contributor

bflad commented Jan 12, 2018

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.

@mdlavin mdlavin deleted the update-api-gateway-integration-uri branch January 22, 2018 18:57
@ghost
Copy link

ghost commented Apr 8, 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 Apr 8, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants