Skip to content

Conversation

@tabito-hara
Copy link
Contributor

@tabito-hara tabito-hara commented Nov 6, 2025

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 root_domain_unit_id to the aws_datazone_domain resource and data source.

AWS API behavior and provider implementation

  • Although RootDomainUnitId is included in the output schema of the CreateDomain API, it is not actually returned. To retrieve this attribute, calling GetDomain is required after the domain creation is completed.
    • UpdateDomain returns a non-empty RootDomainUnitId. Therefore, calling GetDomain after the operation is not necessary.
  • ListDomains does not return RootDomainUnitId, but GetDomain does. In the implementation of the data source, findDomain additionally calls findDomainById and returns the value from GetDomainOutput instead of the value from DomainSummary.

Acceptance tests

  • The acceptance test confirms that root_domain_unit_id is set, even after the domain is updated.

Relations

Closes #44958

References

https://docs.aws.amazon.com/datazone/latest/APIReference/API_CreateDomain.html#datazone-CreateDomain-response-rootDomainUnitId

Output from Acceptance Testing

Resource

$ make testacc TESTS='TestAccDataZoneDomain_' PKG=datazone 
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_datazone_domain-add_root_domain_unit_id 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/datazone/... -v -count 1 -parallel 20 -run='TestAccDataZoneDomain_'  -timeout 360m -vet=off
2025/11/07 00:46:50 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/07 00:46:50 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccDataZoneDomain_basic
=== PAUSE TestAccDataZoneDomain_basic
=== RUN   TestAccDataZoneDomain_disappears
=== PAUSE TestAccDataZoneDomain_disappears
=== RUN   TestAccDataZoneDomain_kms_key_identifier
=== PAUSE TestAccDataZoneDomain_kms_key_identifier
=== RUN   TestAccDataZoneDomain_description
=== PAUSE TestAccDataZoneDomain_description
=== RUN   TestAccDataZoneDomain_single_sign_on
=== PAUSE TestAccDataZoneDomain_single_sign_on
=== RUN   TestAccDataZoneDomain_tags
=== PAUSE TestAccDataZoneDomain_tags
=== RUN   TestAccDataZoneDomain_domainVersionV2
=== PAUSE TestAccDataZoneDomain_domainVersionV2
=== CONT  TestAccDataZoneDomain_basic
=== CONT  TestAccDataZoneDomain_single_sign_on
=== CONT  TestAccDataZoneDomain_kms_key_identifier
=== CONT  TestAccDataZoneDomain_description
=== CONT  TestAccDataZoneDomain_domainVersionV2
=== CONT  TestAccDataZoneDomain_disappears
=== CONT  TestAccDataZoneDomain_tags
--- PASS: TestAccDataZoneDomain_disappears (38.72s)
--- PASS: TestAccDataZoneDomain_kms_key_identifier (40.71s)
--- PASS: TestAccDataZoneDomain_description (41.41s)
--- PASS: TestAccDataZoneDomain_single_sign_on (41.62s)
--- PASS: TestAccDataZoneDomain_domainVersionV2 (57.25s)
--- PASS: TestAccDataZoneDomain_basic (58.52s)
--- PASS: TestAccDataZoneDomain_tags (81.37s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/datazone   85.652s

Data Source

$ make testacc TESTS='TestAccDataZoneDomainDataSource_' PKG=datazone
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_datazone_domain-add_root_domain_unit_id 🌿...
TF_ACC=1 go1.24.8 test ./internal/service/datazone/... -v -count 1 -parallel 20 -run='TestAccDataZoneDomainDataSource_'  -timeout 360m -vet=off
2025/11/07 00:50:30 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/07 00:50:30 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccDataZoneDomainDataSource_basic
=== PAUSE TestAccDataZoneDomainDataSource_basic
=== RUN   TestAccDataZoneDomainDataSource_name
=== PAUSE TestAccDataZoneDomainDataSource_name
=== CONT  TestAccDataZoneDomainDataSource_basic
=== CONT  TestAccDataZoneDomainDataSource_name
--- PASS: TestAccDataZoneDomainDataSource_basic (35.70s)
--- PASS: TestAccDataZoneDomainDataSource_name (35.80s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/datazone   40.206s

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

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/datazone Issues and PRs that pertain to the datazone service. size/S Managed by automation to categorize the size of a PR. labels Nov 6, 2025
@github-actions github-actions bot added the size/M Managed by automation to categorize the size of a PR. label Nov 6, 2025
@tabito-hara tabito-hara marked this pull request as ready for review November 6, 2025 17:15
@tabito-hara tabito-hara requested a review from a team as a code owner November 6, 2025 17:15
@justinretzolk justinretzolk 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 Nov 11, 2025
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. enhancement Requests to existing resources that expand the functionality or scope. service/datazone Issues and PRs that pertain to the datazone service. size/M Managed by automation to categorize the size of a PR. 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.

Add root_domain_unit_id attribute to aws_datazone_domain

2 participants