Closed wilkejo closed 6 months ago
The oepration resource filter the output based on the response of the PUT
. If it returns you an array as shown above, and you are only care about the field, say clusterId
(as I don't see a field named user
in above response), you can do:
output_attrs = ["#.clusterId"]
This will then filter the output into:
[
{
"clusterId": "my-cluster"
}
]
Thank you, I got confused with my requests and responses. Everything is fine, thank you :)
Hello again :)
I planned to use/test the restful_operation to set permissions with an API. The response is an array (details see below) and I get the error Error: Filter
output
during operationused provider version
source = "magodo/restful" version = "0.13.3"
terraform resource
error message:
restful_operation.user_permissions: Creating... ╷ │ Error: Filter
output
during operation │ │ with restful_operation.user_permissions, │ on main.tf line 95, in resource "restful_operation" "user_permissions": │ 95: resource "restful_operation" "user_permissions" { │ │ unexpected end of JSON input ╵example API response