- 22, Oct 2024
- #1
Мне нужно настроить Terragrunt (версия v0.35.16) для пользователя role_arn для конфигурации серверной части Remote_state. Я попробовал следующее для тестирования.
terragrunt init ERRO[0005] Error finding AWS credentials (did you set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables?): NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors ERRO[0005] Unable to determine underlying exit code, so Terragrunt will exit with error code 1
Если я сейчас сделаю инициализацию, я получу этот сбой.
backend = "s3"
generate = {
path = "backend.tf"
if_exists = "overwrite_terragrunt"
}
config = {
bucket = "shared-vpc-${local.common.env}-state"
dynamodb_table = "shared-vpc-${local.common.env}-state-lock"
#profile = local.user.aws.profile_accounts[local.common.env]
key = "${path_relative_to_include()}/terraform.tfstate"
region = local.common.aws_region
encrypt = true
skip_bucket_versioning = false
skip_credentials_validation = true
role_arn = "arn:aws:sts::XXX:assumed-role/AWSReservedSSO_AdministratorAccess_90d249408afa6712/[email protected]"
session_name = "SESSION_NAME"
external_id = "EXTERNAL_ID"
}
}
# Automatically configure provider authentication for AWS
generate provider_auth {
path = "provider-auth.tf"
if_exists = "skip"
contents = <<-EOF
provider aws {
region = "${local.common.aws_region}"
assume_role {
role_arn = "arn:aws:sts::XXX:assumed-role/AWSReservedSSO_AdministratorAccess_90d249408afa6712/[email protected]"
session_name = "SESSION_NAME"
external_id = "EXTERNAL_ID"
}
}
EOF
}
Что я делаю не так с role_arn
#террагрунт