Sub topic 14
Extending the landing zone with AFT and CfCT
This chapter assumes you have a working landing zone, know how Account Factory enrolls accounts, and can read basic Terraform and CloudFormation. Control Tower gives you a governed baseline. Most organizations then need more: a standard VPC, a security tooling role, or account settings applied to every new account. Two tools cover this: Account Factory for Terraform (AFT) and Customizations for Control Tower (CfCT).
What each tool does
Account Factory for Terraform (AFT) is a pipeline you deploy in a dedicated account. You request accounts by committing a Terraform file to a Git repository. AFT then calls Account Factory to create the account and runs your customizations in it.
Customizations for Control Tower (CfCT) is a solution you deploy from a CloudFormation template. It reads a manifest file and a set of templates or policies from a source repository. It then deploys them to the accounts and OUs the manifest names. CfCT also reacts to Control Tower lifecycle events, so a newly enrolled account receives its resources automatically.
Comparing the two
| Aspect | AFT | CfCT |
|---|---|---|
| Infrastructure as code | Terraform | CloudFormation and SCPs |
| Account creation | Part of the pipeline | Not included. Uses Account Factory |
| Customization scope | Global, per account, or per account group | Per OU or per account, set in the manifest |
| Extra infrastructure | Pipeline resources in an AFT management account | Pipeline resources in the management account |
| Trigger | Git commit or lifecycle event | Source change or lifecycle event |
Choosing between them
Pick AFT if your team already uses Terraform and wants account requests to go through code review. Pick CfCT if you work in CloudFormation, mainly need to deploy stacks or SCPs to OUs, and are happy to keep creating accounts through Account Factory.
You can run both, but avoid having them manage the same resource. Two tools changing one setting causes conflicts that are hard to trace.
A minimal CfCT manifest
CfCT reads manifest.yaml from the root of its source. This example deploys one CloudFormation template to every account in the Workloads OU.
region: us-east-1
version: 2021-03-15
resources:
- name: baseline-alerts
resource_file: templates/baseline-alerts.template
deploy_method: stack_set
deployment_targets:
organizational_units:
- Workloads
regions:
- us-east-1The regions list must contain only Regions that Control Tower governs. Putting an ungoverned Region here is a common cause of failed deployments.
Common errors
- Customizing the Control Tower resources. Do not edit the Log Archive and Audit baselines, or the roles and stacks Control Tower creates. This causes drift that you must repair.
- Skipping the landing zone update. Before you upgrade AFT or CfCT, check that your landing zone is current and has no drift. An outdated landing zone can break the pipelines.
- Deploying to the management account by accident. CfCT does not deploy to the management account through OU targets in the way it does for member accounts. Name the management account explicitly if you need it.
- Mixing ownership. Decide which tool owns each resource type and write it down.
Exercise
Your team writes Terraform and wants every new account request reviewed in a pull request before the account is created. Which tool fits, and why?
Show answer
AFT. Account requests are Terraform files in a Git repository, so a pull request review happens before the pipeline creates the account and applies customizations. CfCT does not create accounts.
Exercise
A CfCT deployment fails after you add a Region to the regions list in the manifest. What is the most likely cause?
Show answer
The Region is not a governed Region in the landing zone. CfCT can only deploy to Regions that Control Tower governs, so either add the Region to the landing zone's governed Regions or remove it from the manifest.