Skip to content

Instantly share code, notes, and snippets.

@shmileee
Last active September 9, 2021 09:24
Show Gist options
  • Save shmileee/e126c4b5855d21c0a07a5bc6d9d18b63 to your computer and use it in GitHub Desktop.
Save shmileee/e126c4b5855d21c0a07a5bc6d9d18b63 to your computer and use it in GitHub Desktop.
terraform {
required_version = "~> 1.0.0"
backend "s3" {
bucket = "<bucket>"
key = "admin-global/terraform.tfstate"
dynamodb_table = "terraform-state-lock"
region = "eu-west-1"
encrypt = "true"
}
}
{
"UserId": "<uid>:<email>",
"Account": "<acc_nr>",
"Arn": "arn:aws:sts::<acc nr>:assumed-role/AWSReservedSSO_AdministratorAccess_<random_string>/<email>"
}
backend "s3" {
...
role_arn = "arn:aws:iam::<acc nr>:role/atlantis"
}
provider "aws" {
assume_role {
role_arn = "arn:aws:iam::<acc nr>:role/atlantis"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment