2023-07-01 16:52:19 +08:00
|
|
|
data "external" "awscli" {
|
|
|
|
program = [format("%s/assumeRole.sh", path.module)]
|
|
|
|
query = {
|
2023-07-03 19:57:25 +08:00
|
|
|
assume_role_arn = "arn:aws:iam::${var.account_id}:role/${var.role_name}"
|
2023-07-01 16:52:19 +08:00
|
|
|
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
|
2023-07-01 16:52:19 +08:00
|
|
|
}
|