Skip to content

Commit edd0b1b

Browse files
committed
docs: add doc for sensitive ephemeral values
1 parent 0b06727 commit edd0b1b

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

docs/ephemeral-resources/resource_action.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,33 @@ ephemeral "azapi_resource_action" "listKeys" {
9999

100100
To learn more about JMESPath, visit [JMESPath](https://jmespath.org/).
101101
- `retry` (Attributes) The retry block supports the following arguments: (see [below for nested schema](#nestedatt--retry))
102+
- `sensitive_response_export_values` (Dynamic) The attribute can accept either a list or a map.
103+
104+
- **List**: A list of paths that need to be exported from the response body. Setting it to `["*"]` will export the full response body. Here's an example. If it sets to `["properties.loginServer", "properties.policies.quarantinePolicy.status"]`, it will set the following HCL object to the computed property output.
105+
106+
```text
107+
{
108+
properties = {
109+
loginServer = "registry1.azurecr.io"
110+
policies = {
111+
quarantinePolicy = {
112+
status = "disabled"
113+
}
114+
}
115+
}
116+
}
117+
```
118+
119+
- **Map**: A map where the key is the name for the result and the value is a JMESPath query string to filter the response. Here's an example. If it sets to `{"login_server": "properties.loginServer", "quarantine_status": "properties.policies.quarantinePolicy.status"}`, it will set the following HCL object to the computed property output.
120+
121+
```text
122+
{
123+
"login_server" = "registry1.azurecr.io"
124+
"quarantine_status" = "disabled"
125+
}
126+
```
127+
128+
To learn more about JMESPath, visit [JMESPath](https://jmespath.org/).
102129
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
103130

104131
### Read-Only
@@ -117,6 +144,21 @@ To learn more about JMESPath, visit [JMESPath](https://jmespath.org/).
117144
value = ephemeral.azapi_resource_action.example.output.properties.policies.quarantinePolicy.status
118145
}
119146
```
147+
- `sensitive_output` (Dynamic, Sensitive) The output HCL object containing the properties specified in `sensitive_response_export_values`. Here are some examples to use the values.
148+
149+
```terraform
150+
// it will output "registry1.azurecr.io"
151+
output "login_server" {
152+
value = ephemeral.azapi_resource_action.example.sensitive_output.properties.loginServer
153+
sensitive = true
154+
}
155+
156+
// it will output "disabled"
157+
output "quarantine_policy" {
158+
value = ephemeral.azapi_resource_action.example.sensitive_output.properties.policies.quarantinePolicy.status
159+
sensitive = true
160+
}
161+
```
120162

121163
<a id="nestedatt--retry"></a>
122164
### Nested Schema for `retry`

0 commit comments

Comments
 (0)