-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request - Allow list/array in query
and result
#2
Comments
@apparentlymart Is this a viable universal work around?: query = {
params = "base64endcode(jsonencode(var.list_of_images))"
} In the bash script use tf to decode: Q=$(echo 'base64decode($PARAMS)' | terraform console)
# do sripty stuff on Q
echo 'base64decode(jsonencode($OUTPUT))' | terraform console |
This workaround relies on bash being installed, meaning that it's not easily portable between macOS/Linux and Windows. In practice, I'm aware that Windows can run Bash, but depending on it for cross-platform compatibility is less than ideal. In my personal use case, I've got a data structure which I'd like to pass directly to |
Would really like this too. I want to build GCP custom roles by calling the gcloud CLI to grab permissions from built-in roles.... but for the life of me cannot get them back in a format TF is ok with. If it would just accept an array. |
Please rename the issue to include the result attribute. The issue request mentions both |
result
result
query
and result
After being frustrated by the very limited JSON parsing capacity of the external provider, I found that
If the external provider simply parsed the |
This issue was originally opened by @vikas027 as hashicorp/terraform#12249. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
0.8.7
Affected Resource(s)
external data source
Terraform Configuration Files
Expected Behavior
List
list_of_images
should have been passed to the script.Actual Behavior
Terraform Version
0.8.7
Affected Resource(s)
Terraform Configuration Files
create_policy.sh
Expected Behavior
Terraform shouldn't thrown an error when the the bash script is producing a valid json
Actual Behavior
Steps to Reproduce
Create the resource and the script files and run
terraform plan
The text was updated successfully, but these errors were encountered: