9. Deployed as code
A CloudFormation stack creates the state bucket and the pipeline roles once. Terraform deploys the rest except the FortiGates' own configuration, which FortiManager installs. A change reaches AWS through a pull request.

-
A pull request carries Terraform, Python and policy files.
-
Quality gates run: format, lint, validate, tests and a security scan.
-
A read-only role plans the change and posts the result on the pull request.
-
A second person reviews. The main branch is protected.
-
The deploy workflow runs on a merge to main when deploys are enabled for the repository, and otherwise is started by hand. It signs in with a short-lived role, so no long-lived keys exist.
-
Terraform applies the global layer first, then each region.
-
FortiManager installs the full configuration on the FortiGates, which register with it.
State is layered: the Cloud WAN core network, then each region, then the Fortinet layer of each region. The Elastic IP pool has its own state and is never destroyed with the rest.
Next: 10. Start the walkthrough.