Add a variable AWS::OrganizationId to refer to the organisation of the current account.
Not sure of what the default behaviour should be if account not in organization, but failure or empty both seem possible.
The variable should be available for the template
AWS::OrganizationId, would return the ID of the Organization of the account if defined or empty otherwise.
If account in organisation returned value should match what is seen in interface.
If account not in organisation, value should return empty.
See return of DescribeOrganisation: https://docs.aws.amazon.com/organizations/latest/APIReference/API_DescribeOrganization.html
pseudo parameters:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html
Other : AWS Organizations
bump
This would be really helpful.
OrganizationalUnit as well
Requested 18 months ago, this would be a much easier solution than having to pass Org Id in as a parameter to templates.
This would really help Control Tower deployments.
Most helpful comment
bump
This would be really helpful.