terraform.aws-baseline-infra/modules/util/assume_role/README.md
2023-07-03 08:32:09 +08:00

1.1 KiB

assume_role module

This module uses awscli, calls sts and obtain temp credentials for role switching. Returns the temp credential as a map.

System requirements

  • awscli
  • jq

Inputs

variable type required description
account_id string yes target aws account id
role_name string yes target role name
role_session_name string no session name, useful for tracing logs in cloudtrail. defaults to tf_awscli

Outputs

variable type sensitive description
temp_credential map of string yes json output from awscli
{
    "AccessKeyId": "111",
    "SecretAccessKey": "222",
    "SessionToken": "333",
    "Expiration": "2023-07-01T10:19:47+00:00"
}