-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
[New Data Source]: Datasource for Organizations Policies #30682
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Somewhat oddly, and maybe worth filing a separate bug, but the published docs for Provider 5.1.0 list a Data that purports to do this: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/organizations_policy With full example code that includes a misspelling of "organizational" as |
The resource and code don't exist in 5.1.0. I had tried doing two parallel pull requests for the same release one relying on the other. One got accepted the other one (this one) got punted with some fixes. The current pull request that closes this will update the documentation to be correct, not have a typo, and enable aws_organizations_policies_for_target datasource once its accepted. |
This functionality has been released in v5.4.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. Thank you! |
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. |
Description
There currently is no way to list all of the policies that are associated with a target account outside of the root account making it hard to define what has been applied to a root, OU or account. More specifically 4 different types of policies (SERVICE_CONTROL_POLICY | TAG_POLICY | BACKUP_POLICY | AISERVICES_OPT_OUT_POLICY) can all be applied to an OU, account or root but currently only the root can have policies listed. By providing this data source this allows any account in an organization to provide all of the policies associated.
Requested Resource(s) and/or Data Source(s)
aws_organizations_organizational_policies
Potential Terraform Configuration
This would be a wrapping of the ListPolciesForTarget which can target a ou,root or an account to provide all of the polices that are associated with the target id.
References
https://docs.aws.amazon.com/organizations/latest/APIReference/API_ListPoliciesForTarget.html
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: