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

Add support for BinaryMediaTypes and ContentHandling to AWS API Gateway #10776

Merged
merged 1 commit into from
Dec 16, 2016

Conversation

jmettes
Copy link
Contributor

@jmettes jmettes commented Dec 16, 2016

I've added support for BinaryMediaTypes in AWS API Gateway RestApi to allow for handling binary payloads (e.g., JPG images).

I also added ContentHandling to AWS API Gateway Integration to enable conversion from binary or text -> Base64. This is important for passing content from API Gateway to Lambda since Lambda can only handle Base64.

This implements enhancement issue: #10696

Relevant APIs docs:

API Gateway RestApi
https://docs.aws.amazon.com/apigateway/api-reference/resource/rest-api/

API Gateway Integration
https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/

Tests

I didn't run all the AWS provider Acceptance Tests, but I did run the relevant unit tests to these changes (which passed):

make testacc TEST=./builtin/providers/aws TESTARGS="-run TestAccAWSAPIGatewayRestApi_basic" AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=...

and

make testacc TEST=./builtin/providers/aws TESTARGS="-run TestAccAWSAPIGatewayIntegration_basic" AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=...

@stack72
Copy link
Contributor

stack72 commented Dec 16, 2016

Hi @jmettes

Thanks so much for the work here - this LGTM and the tests are passing as expected. Unfortunately, this will need a slight addition for documentation. I am going to manually merge this and add the docs for you

% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayRestApi_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/16 11:16:30 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAPIGatewayRestApi_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayRestApi_basic
--- PASS: TestAccAWSAPIGatewayRestApi_basic (55.54s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	55.566s
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAPIGatewayIntegration_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/12/16 11:19:34 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAPIGatewayIntegration_ -timeout 120m
=== RUN   TestAccAWSAPIGatewayIntegration_basic
--- PASS: TestAccAWSAPIGatewayIntegration_basic (48.68s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	48.703s

Thanks

Paul

@ghost
Copy link

ghost commented Apr 18, 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 18, 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