The response_export_values attribute determines how data from the Azure API response is mapped to the output attribute of the ephemeral resource. It supports two modes:
1. List Mode
Provide a list of JMESPath paths to export. Setting it to ["*"] exports the full response body.
Example:
If you set ["properties.loginServer", "properties.policies.quarantinePolicy.status"], the output will be:
{
properties = {
loginServer = "registry1.azurecr.io"
policies = {
quarantinePolicy = {
status = "disabled"
}
}
}
}
2. Map Mode
Provide a map where the key is your desired result name and the value is a JMESPath query string.
Example:
If you set {"login_server": "properties.loginServer", "quarantine_status": "properties.policies.quarantinePolicy.status"}, the output will be:
{
"login_server" = "registry1.azurecr.io"
"quarantine_status" = "disabled"
}
# Example of using the output from an ephemeral resource
output "login_server" {
value = ephemeral.azapi_resource_action.example.output.properties.loginServer
}