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

Update aws_organizations_organization to output accounts excluding master #8903

Closed
e-moshaya opened this issue Jun 7, 2019 · 5 comments · Fixed by #8926
Closed

Update aws_organizations_organization to output accounts excluding master #8903

e-moshaya opened this issue Jun 7, 2019 · 5 comments · Fixed by #8926
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/organizations Issues and PRs that pertain to the organizations service.
Milestone

Comments

@e-moshaya
Copy link

Based on documentation, https://www.terraform.io/docs/providers/aws/r/organizations_organization.html you can output the list off account ids via aws_organizations_organization resources by referencing:

"${lookup(aws_organizations_organization.root.accounts[count.index], "id")}"

However, I am trying to create resources for member accounts to accept invitations from the master account and therefore the resource needs to loop through all account ids for member accounts. Is there any way you can output accounts excl master?

@e-moshaya e-moshaya added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 7, 2019
@bflad bflad added the service/organizations Issues and PRs that pertain to the organizations service. label Jun 10, 2019
bflad added a commit that referenced this issue Jun 10, 2019
…ibute

Reference: #8903

This seems like it might be a common use case, so we provide a native attribute rather than requiring all implementations to filter the existing `accounts` attribute.

Output from acceptance testing:

```
        --- PASS: TestAccAWSOrganizations/Organization/basic (14.39s)
```
@bflad
Copy link
Contributor

bflad commented Jun 10, 2019

Submitted pull request to add a new non_master_accounts attribute: #8926

@bflad bflad added this to the v2.16.0 milestone Jun 18, 2019
@bflad
Copy link
Contributor

bflad commented Jun 18, 2019

Support for a new non_master_accounts attribute (similar to the existing accounts attribute) has been merged and will release with version 2.16.0 of the Terraform AWS Provider, likely later this week. 👍

@e-moshaya
Copy link
Author

e-moshaya commented Jun 18, 2019

awesome thanks @bflad 👍

@bflad
Copy link
Contributor

bflad commented Jun 20, 2019

This has been released in version 2.16.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Nov 3, 2019

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.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/organizations Issues and PRs that pertain to the organizations service.
Projects
None yet
2 participants