DEV Community

Discussion on: Maintaining and Governing Developer Accounts with AWS Control Tower, Part 2

Collapse
 
thomastco profile image
ThomasTCO

Hi Derek,

Im looking for a way to dynamically fill in the "apply_to_accounts_in_ou" section.

In other words, I would like to use the awscli to get all the OUs I want for the "apply_to_accountd_in_ou" section.

So technically, this command will return me all the OUs with "Prod" in the name :
aws organizations list-organizational-units-for-parent --parent-id XXXXX --query "OrganizationalUnits[*].[Name]" --output text | grep Prod

Then I would like tu use this list in my manifest.yaml file but I don't know how to reference it!

I tried things like "$ref file.js" or "!include file.js" but it doesn't work.

Any experience on that ?

Cheers,
Thomas