News for hackers. Stuff that matters.
Re:Terraform best practices for reliability at any scale by infogulch on Friday August 04, 2023 @09:43PM (#37008133)
> Creating a new AWS account is kind of annoying, though. I need to automate that process better.

You can do that with terraform...

Re:Terraform best practices for reliability at any scale by yellowapple on Friday August 04, 2023 @10:04PM (#37008261)
You 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.
Re:Terraform best practices for reliability at any scale by infogulch on Saturday August 05, 2023 @04:02PM (#37015801)
terraform_remote_state
Re:Terraform best practices for reliability at any scale by yellowapple on Sunday August 06, 2023 @04:10AM (#37019928)
Can 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.
Re:Terraform best practices for reliability at any scale by ftc on Sunday August 06, 2023 @04:10AM (#37019929)
Another option is to use AWS Control Tower: https://docs.aws.amazon.com/controltower/latest/userguide/af...