terraform.aws-baseline-infra/modules/util/assume_role/main.tf

13 lines
309 B
Terraform
Raw Normal View History

data "external" "awscli" {
program = [format("%s/assumeRole.sh", path.module)]
query = {
assume_role_arn = "arn:aws:iam::${var.account_id}:role/${var.role_name}"
role_session_name = var.role_session_name
}
}
output temp_credential {
value = data.external.awscli.result
2023-07-01 17:00:36 +08:00
sensitive = true
}