So , I am wondering if anyone could help here, I am truly lost. My task is to run an aws cli command to pull back the Tagged value as shown
So I invoke as you would expect like this
data "external" "awscli-query" {
program = ["bash", "${path.module}/awscli.sh"]
query = {
env = "${var.account_name}"
}
}
Then parse the shell like this
#!/bin/bash
set -e
# Extract arguments from the input into shell variables.
# jq will ensure that the values are properly quoted
# and escaped for consumption by the shell.
eval "$(jq -r 'to_entries[] | "\(.key | ascii_upcase)=\(.value | @sh)"')"
eval "$(jq -r '@sh "ENV=\(.env)"')"
billing_ID=$(aws organizations list-tags-for-resource --resource **<$env>** --....
Can you put variables in like shown , a little confused