org-formation / org-formation-reference

A reference architecture which aims to provide some best practices for any AWS Organization starting out using org-formation.
91 stars 23 forks source link

Patterns used here versus those in org-formation-cli/examples #44

Closed NickDarvey closed 3 years ago

NickDarvey commented 3 years ago

I noticed that this repo follows the pattern that organization bindings are done at the task level, but the examples in the org-formation-cli repo seem to do it at the template level.

Are there trade-offs I need to consider about doing it in one place over the other?

For context, I'm about to follow the subdomains example to add a templates/120-dns folder and generate hosted zones for some accounts in my organization.

OlafConijn commented 3 years ago

hi!

Some of those examples are from the time before task files. regardless:

if an organizational binding is used in a template (and sometimes there are multiple) you can optionally declare them at the top of the template and provide a sensible default. i believe most examples do this even if the value is overwritten at the task level. so: the values in the task override the values in the template. Same applies to StackDescription, which will override the description that is part of the template.

if all resources in the template need to be deployed to the same target (e.g. all accounts need to have the exact same resources) then i would not use specific organization bindings. there is a DefaultOrganizationBinding that can be set in the task in this case.

does that make sense?

NickDarvey commented 3 years ago

It does! Thanks :)