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 TLS Config to api gateway integration #15499

Merged
merged 2 commits into from
Jan 13, 2021

Conversation

tmcgahern
Copy link
Contributor

@tmcgahern tmcgahern commented Oct 5, 2020

Co-authored-by: jake-mcdermott mail@jake.ie

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

Closes #15492

The change was based on a similar tls_config block in the API gateway V2 integration here:
https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/resource_aws_apigatewayv2_integration.go#L132

Release note for CHANGELOG:

resource/aws_api_gateway_integration: Add `tls_config` block to support `insecureSkipVerification` 

Output from acceptance testing:

make testacc TESTARGS='-run=TestAccAWSAPIGatewayIntegration'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAPIGatewayIntegration -timeout 120m
=== RUN   TestAccAWSAPIGatewayIntegrationResponse_basic
=== PAUSE TestAccAWSAPIGatewayIntegrationResponse_basic
=== RUN   TestAccAWSAPIGatewayIntegrationResponse_disappears
=== PAUSE TestAccAWSAPIGatewayIntegrationResponse_disappears
=== RUN   TestAccAWSAPIGatewayIntegration_basic
=== PAUSE TestAccAWSAPIGatewayIntegration_basic
=== RUN   TestAccAWSAPIGatewayIntegration_contentHandling
=== PAUSE TestAccAWSAPIGatewayIntegration_contentHandling
=== RUN   TestAccAWSAPIGatewayIntegration_cache_key_parameters
=== PAUSE TestAccAWSAPIGatewayIntegration_cache_key_parameters
=== RUN   TestAccAWSAPIGatewayIntegration_integrationType
=== PAUSE TestAccAWSAPIGatewayIntegration_integrationType
=== RUN   TestAccAWSAPIGatewayIntegration_disappears
=== PAUSE TestAccAWSAPIGatewayIntegration_disappears
=== CONT  TestAccAWSAPIGatewayIntegrationResponse_basic
=== CONT  TestAccAWSAPIGatewayIntegration_cache_key_parameters
=== CONT  TestAccAWSAPIGatewayIntegration_disappears
=== CONT  TestAccAWSAPIGatewayIntegration_basic
=== CONT  TestAccAWSAPIGatewayIntegration_contentHandling
=== CONT  TestAccAWSAPIGatewayIntegration_integrationType
=== CONT  TestAccAWSAPIGatewayIntegrationResponse_disappears
=== CONT  TestAccAWSAPIGatewayIntegration_disappears
    resource_aws_api_gateway_integration_test.go:296: [INFO] Got non-empty plan, as expected
=== CONT  TestAccAWSAPIGatewayIntegrationResponse_disappears
    resource_aws_api_gateway_integration_response_test.go:67: [INFO] Got non-empty plan, as expected
--- PASS: TestAccAWSAPIGatewayIntegration_disappears (128.41s)
--- PASS: TestAccAWSAPIGatewayIntegrationResponse_disappears (132.04s)
--- PASS: TestAccAWSAPIGatewayIntegration_cache_key_parameters (143.51s)
--- PASS: TestAccAWSAPIGatewayIntegrationResponse_basic (220.33s)
2020/10/05 20:01:55 [INFO] Successfully derived credentials from session
2020/10/05 20:01:55 [INFO] AWS Auth provider used: "AssumeRoleProvider"
--- PASS: TestAccAWSAPIGatewayIntegration_contentHandling (282.20s)
--- PASS: TestAccAWSAPIGatewayIntegration_basic (374.41s)
--- PASS: TestAccAWSAPIGatewayIntegration_integrationType (917.51s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       920.219s```

Co-authored-by: jake-mcdermott <mail@jake.ie>
@tmcgahern tmcgahern requested a review from a team October 5, 2020 19:06
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/apigateway Issues and PRs that pertain to the apigateway service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Oct 5, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Oct 5, 2020
@tmcgahern tmcgahern changed the title Add TLS config to apigw integration Add TLS Config to api gateway integration Oct 5, 2020
Co-authored-by: jake-mcdermott <mail@jake.ie>
@@ -272,11 +272,10 @@ func TestAccAWSAPIGatewayIntegration_integrationType(t *testing.T) {
),
},
{
Config: testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeInternet(rName),
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 test is the same as Line 259 so instead of creating another test I've replaced the duplicate with the new test

Copy link
Contributor

Choose a reason for hiding this comment

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

If I recall correctly, the update back to INTERNET was an intentional update test. In general, the maintainers prefer if existing testing is not touched to ensure regressions are covered.

@anGie44 anGie44 added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 13, 2020
@bflad bflad self-assigned this Jan 13, 2021
@bflad bflad added this to the v3.24.0 milestone Jan 13, 2021
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Thank you for submitting this, @tmcgahern. Overall it looks really good and we will be pulling this in with just some minor testing updates.

@@ -272,11 +272,10 @@ func TestAccAWSAPIGatewayIntegration_integrationType(t *testing.T) {
),
},
{
Config: testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeInternet(rName),
Copy link
Contributor

Choose a reason for hiding this comment

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

If I recall correctly, the update back to INTERNET was an intentional update test. In general, the maintainers prefer if existing testing is not touched to ensure regressions are covered.

@@ -272,11 +272,10 @@ func TestAccAWSAPIGatewayIntegration_integrationType(t *testing.T) {
),
},
{
Config: testAccAWSAPIGatewayIntegrationConfig_IntegrationTypeInternet(rName),
Config: testAccAWSAPIGatewayIntegrationConfig_IntegrationTLSConfig(rName),
Copy link
Contributor

Choose a reason for hiding this comment

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

Will move this to its own acceptance test and make the insecure_skip_verification a boolean function parameter so we can easily verify updates between true/false.

@bflad bflad merged commit 50538a0 into hashicorp:master Jan 13, 2021
bflad added a commit that referenced this pull request Jan 13, 2021
@ghost
Copy link

ghost commented Jan 15, 2021

This has been released in version 3.24.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 Feb 12, 2021

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 as resolved and limited conversation to collaborators Feb 12, 2021
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/apigateway Issues and PRs that pertain to the apigateway 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.

Add TLS_CONFIG block to API Gateway Integration
3 participants