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

provider/aws: Added API Gateway integration update #13249

Merged
merged 1 commit into from
Mar 31, 2017

Conversation

Ninir
Copy link
Contributor

@Ninir Ninir commented Mar 31, 2017

Description

This adds the update part to the API Gateway integration.

As per the documentation, everything excepted request_templates & request_parameters can't be added nor removed, for the attributes we have at time.
As they are not marked as Required, we need to flag them to be recreated on change, thus using the ForceNew attribute.

I reworked the acc tests so that they are clearer and handle this workflow, since the API to Create is different from the Update one (Series of PatchOperations):

  1. Creation of resources using the
  2. Update: Removal + Additions + Replaces
  3. Removal & state checks

Related issues

Tests

$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayIntegration_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/31 17:51:35 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAPIGatewayIntegration_basic -timeout 120m
=== RUN   TestAccAWSAPIGatewayIntegration_basic
--- PASS: TestAccAWSAPIGatewayIntegration_basic (96.88s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	96.913s

@Ninir Ninir force-pushed the b-aws-apigw-integration-update branch from b411914 to d70147b Compare March 31, 2017 15:43
@@ -37,6 +37,10 @@ resource "aws_api_gateway_integration" "MyDemoIntegration" {
http_method = "${aws_api_gateway_method.MyDemoMethod.http_method}"
type = "MOCK"

request_parameters = {
"integration.request.header.X-Authorization" = "'static'"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fixes the second issue

@Ninir Ninir force-pushed the b-aws-apigw-integration-update branch from d70147b to 2cd4e80 Compare March 31, 2017 15:54
@stack72
Copy link
Contributor

stack72 commented Mar 31, 2017

This is fantastic! Thanks so much for taking the time to work on this - LGTM!

@ghost
Copy link

ghost commented Apr 14, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants