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

r/vpc_endpoint: fix private_dns_only_for_inbound_resolver_endpoint #32021

Conversation

FabianPonce
Copy link
Contributor

@FabianPonce FabianPonce commented Jun 15, 2023

Description

This PR is a follow-on from #31873 , which seems to have a defect. In order to create a VPC Endpoint for S3 in Interface mode, the field private_dns_only_for_inbound_resolver_endpoint MUST be set to false.

In the previous PR, the value was only sent when true, otherwise as nil. AWS interprets the nil option the same as if it were set to true, which is odd.

In any case, it was impossible to set this value to false.

In the case of this value being set to false, the test should have no dependency on a VPC Endpoint of GATEWAY type. The test passed in the previous PR because the gateway was created and the value was interpreted as true.

In the case of this value being set to true, this test continues to have a dependency on the VPC Endpoint of GATEWAY type.

Relations

Closes #30041.
Relates #31873.

Output from Acceptance Testing

make testacc TESTS=TestAccVPCEndpoint_interfacePrivateDNS PKG=ec2  2 ↵  6578  16:12:03 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpoint_interfacePrivateDNS'  -timeout 180m
=== RUN   TestAccVPCEndpoint_interfacePrivateDNS
=== PAUSE TestAccVPCEndpoint_interfacePrivateDNS
=== CONT  TestAccVPCEndpoint_interfacePrivateDNS
--- PASS: TestAccVPCEndpoint_interfacePrivateDNS (449.81s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	450.003s

...

This field was always set to True or nil, and could not be set to False.
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/vpc Issues and PRs that pertain to the vpc service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/S Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. labels Jun 15, 2023
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jun 16, 2023
@ewbankkit
Copy link
Contributor

=== CONT  TestAccVPCEndpoint_ipAddressType
    vpc_endpoint_test.go:360: Step 1/3 error: Error running apply: exit status 1
        
        Error: creating EC2 VPC Endpoint (com.amazonaws.vpce.us-west-2.vpce-svc-00809ad67b7780d3f): InvalidParameter: PrivateDnsOnlyForInboundResolverEndpoint not supported for this service.
        	status code: 400, request id: 7751fc22-b3ff-4ac6-b44d-3109e2f7d05c
        
          with aws_vpc_endpoint.test,
          on terraform_plugin_test.tf line 60, in resource "aws_vpc_endpoint" "test":
          60: resource "aws_vpc_endpoint" "test" {
        
--- FAIL: TestAccVPCEndpoint_ipAddressType (237.20s)

@FabianPonce
Copy link
Contributor Author

Sorry for letting this go stale, will have an update in the next day or so.

@ewbankkit
Copy link
Contributor

@FabianPonce Thanks for the contribution 🎉 👏. The functionality has been implemented in #32355.

@github-actions
Copy link

github-actions bot commented Aug 5, 2023

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/vpc Issues and PRs that pertain to the vpc service. size/S 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.

Private DNS options for VPC endpoints
2 participants