2023-07-01 16:52:19 +08:00
|
|
|
data "external" "awscli_program" {
|
2023-07-03 19:57:25 +08:00
|
|
|
program = [format("%s/run_awscli.sh", path.module)]
|
2023-07-01 16:52:19 +08:00
|
|
|
query = {
|
|
|
|
access_key = var.access_key
|
|
|
|
secret_key = var.secret_key
|
|
|
|
session_token = var.session_token
|
|
|
|
aws_cli_commands = var.aws_cli_commands
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-03 19:57:25 +08:00
|
|
|
# decode encapsulated string back to original
|
2023-07-01 16:52:19 +08:00
|
|
|
output awscliout {
|
|
|
|
value = jsondecode(base64decode(data.external.awscli_program.result.awscliout))
|
|
|
|
}
|