Skip to content

Commit 025c20b

Browse files
aknyshclaude
andcommitted
docs: Address CodeRabbit nitpick suggestions
- Clarify that !terraform.state returns null when state file doesn't exist - Enhance YQ expression comments in store.get.mdx to be more specific 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent fb051f8 commit 025c20b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

website/docs/functions/yaml/store.get.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ from complex data structures:
128128

129129
<File title="stack.yaml">
130130
```yaml
131-
# Extract a field from a JSON object
131+
# Extract database host from app-config in Redis
132132
database_host: !store.get redis app-config | query .database.host
133133
134-
# Get the first item from an array
134+
# Get the first availability zone from Azure Key Vault array
135135
primary_zone: !store.get azure-keyvault availability-zones | query .[0]
136136
137-
# Extract nested values with a default
137+
# Extract API key from SSM config with empty object fallback
138138
api_key: !store.get ssm /external/config | default "{}" | query .api.key
139139
```
140140
</File>

website/docs/functions/yaml/terraform.state.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,5 +559,5 @@ vars:
559559

560560
- Be mindful of disaster recovery (DR) implications when using it across regions.
561561

562-
- Consider cold-start scenarios: if the dependent component has not yet been provisioned, the `!terraform.state` function will return `null`.
562+
- Consider cold-start scenarios: if the referenced component's state file doesn't exist (e.g., not yet provisioned), `!terraform.state` returns `null`.
563563
Use the YQ `//` operator to provide default values for components that may not be provisioned yet (see [Using YQ Expressions to provide a default value](#using-yq-expressions-to-provide-a-default-value)).

0 commit comments

Comments
 (0)