hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

[New Data Source]: `aws_organizations_roots` #35643

Open AliAllomani opened 7 months ago

AliAllomani commented 7 months ago

Description

The currently available data source to fetch the organization root is aws_organizations_organization. However, this data source also fetch several other information such accounts list which takes long time in large scale organizations and requires higher permissions that needed.

a new data source to get organization's roots only would be more suffient

Requested Resource(s) and/or Data Source(s)

Potential Terraform Configuration

data "aws_organizations_roots" "org" {}

data "aws_organizations_organizational_unit" "ou" {
  parent_id = data.aws_organizations_roots.org.roots[0].id
  name      = "dev"
}

References

Would you like to implement a fix?

None

github-actions[bot] commented 7 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue