3 ms·
> Creating a new AWS account is kind of annoying, though. I need to automate that process better. You can do that with terraform...
by infogulch 3y ago
> Creating a new AWS account is kind of annoying, though. I need to automate that process better.
You can do that with terraform...
- yellowapple 3y agoYou can, but using Terraform to provision resources inside those accounts entails pulling generated/defined credentials from the org-level TF state and feeding that into the provider config for each app-env-level TF state. Vanilla Terraform doesn't support that very well (or at all, last I checked), but either some CI/CD pipeline creativity or Terragrunt (or both!) can work around it.
- infogulch 3y agoterraform_remote_state
- yellowapple 3y agoCan providers use the output from terraform_remote_state to set e.g. credentials? Last I checked, datasources get sourced during terraform plan/apply whereas provider configs need to be known as early as terraform init.
- ftc 3y agoAnother option is to use AWS Control Tower: https://docs.aws.amazon.com/controltower/latest/userguide/aft-overview.html https://docs.aws.amazon.com/controltower/latest/userguide/af...