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

14 lines
417 B
HCL

data "external" "awscli_program" {
program = [format("%s/run_awscli.sh", path.module)]
query = {
access_key = var.access_key
secret_key = var.secret_key
session_token = var.session_token
aws_cli_commands = var.aws_cli_commands
}
}
# decode encapsulated string back to original
output awscliout {
value = jsondecode(base64decode(data.external.awscli_program.result.awscliout))
}