Skip to content

Conversation

@tabito-hara
Copy link
Contributor

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

This PR adds the private_dns_enabled and dns_options arguments to the aws_vpclattice_service_network_vpc_association resource.

AWS API Behavior and Provider Implementation

  • dns_options can be specified only when private_dns_enabled is set to true.
    • The expander and flattener for dns_options are invoked only when private_dns_enabled is true.
  • dns_options.private_dns_specified_domains can be specified only when dns_options.private_dns_preference is set to either VERIFIED_DOMAINS_AND_SPECIFIED_DOMAINS or SPECIFIED_DOMAINS_ONLY.
    • The expander for private_dns_specified_domains is invoked only when dns_options.private_dns_preference has one of these values.
  • Even when dns_options.private_dns_specified_domains is not specified in the configuration, the AWS API returns this value as ["*"] when dns_options.private_dns_preference is VERIFIED_DOMAINS_ONLY or ALL_DOMAINS.
    • Therefore, dns_options.private_dns_specified_domains is marked as Computed.
  • private_dns_enabled (Boolean) is marked as Computed to avoid diffs when running terraform plan against existing resources.

Relations

Closes #45602

References

https://docs.aws.amazon.com/vpc-lattice/latest/APIReference/API_CreateServiceNetworkVpcAssociation.html#vpclattice-CreateServiceNetworkVpcAssociation-request-dnsOptions

Output from Acceptance Testing

$ make testacc TESTS='TestAccVPCLatticeServiceNetworkVPCAssociation_' PKG=vpclattice
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_vpclattice_service_network_vpc_association-add_private_dns 🌿...
TF_ACC=1 go1.24.11 test ./internal/service/vpclattice/... -v -count 1 -parallel 20 -run='TestAccVPCLatticeServiceNetworkVPCAssociation_'  -timeout 360m -vet=off
2025/12/17 09:54:58 Creating Terraform AWS Provider (SDKv2-style)...
2025/12/17 09:54:58 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_basic
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_basic
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_arn
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_arn
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_full
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_full
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_privateDNS
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_privateDNS
=== RUN   TestAccVPCLatticeServiceNetworkVPCAssociation_tags
=== PAUSE TestAccVPCLatticeServiceNetworkVPCAssociation_tags
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_basic
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_full
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_tags
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_disappears
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_privateDNS
=== CONT  TestAccVPCLatticeServiceNetworkVPCAssociation_arn
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_basic (168.49s)
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_arn (192.92s)
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_tags (201.76s)
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_disappears (245.59s)
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_full (256.35s)
--- PASS: TestAccVPCLatticeServiceNetworkVPCAssociation_privateDNS (673.64s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/vpclattice 677.900s

@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • 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 needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/vpclattice Issues and PRs that pertain to the vpclattice service. size/L Managed by automation to categorize the size of a PR. labels Dec 17, 2025
@tabito-hara tabito-hara marked this pull request as ready for review December 17, 2025 01:33
@tabito-hara tabito-hara requested a review from a team as a code owner December 17, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Introduces or discusses updates to documentation. needs-triage Waiting for first response or review from a maintainer. service/vpclattice Issues and PRs that pertain to the vpclattice service. size/L 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.

aws_vpclattice_service_network_vpc_association private dns support

1 participant