You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,74 @@
1
1
# Changelog
2
2
3
+
## 2.0.4 (2026-03-18)
4
+
5
+
### Identifier capture from `exists` queries
6
+
7
+
The `exists` query can now return a named field (e.g. `vpc_id`) instead of `count`. The returned value is automatically captured as a resource-scoped variable (`{{ this.<field> }}`) and made available to all subsequent queries (`statecheck`, `exports`, `delete`) for that resource. This enables a two-step workflow where `exists` discovers the resource identifier and `statecheck` verifies its properties.
8
+
9
+
- When `exists` returns `null` or empty for the captured field, the resource is treated as non-existent
10
+
- Multiple rows from an `exists` (identifier pattern) or `exports` query is now a fatal error
11
+
- After a `create`, the `exists` query is automatically re-run to capture the identifier for use in post-deploy `statecheck` and `exports` queries
12
+
13
+
### `RETURNING *` identifier capture
14
+
15
+
When a `create` statement includes `RETURNING *` and the response contains an `Identifier` field, it is automatically injected as `this.identifier` — skipping the post-create `exists` re-run and saving an API call per resource.
16
+
17
+
### `return_vals` manifest field
18
+
19
+
New optional `return_vals` field on resources to explicitly map fields from `RETURNING *` responses to resource-scoped variables:
20
+
21
+
```yaml
22
+
return_vals:
23
+
create:
24
+
- Identifier: identifier # rename pattern
25
+
- ErrorCode # direct capture
26
+
```
27
+
28
+
If `return_vals` is specified but the field is missing from the response, the build fails.
29
+
30
+
### `to_aws_tag_filters` template filter
31
+
32
+
New AWS-specific Tera filter that converts `global_tags` (list of `Key`/`Value` pairs) to the AWS Resource Groups Tagging API `TagFilters` format:
33
+
34
+
```sql
35
+
AND TagFilters = '{{ global_tags | to_aws_tag_filters }}'
36
+
```
37
+
38
+
### YAML type preservation fix
39
+
40
+
Fixed an issue where YAML string values that look like numbers (e.g. `IpProtocol: "-1"`) were being coerced to integers during JSON serialization. String types declared in YAML are now preserved through to the rendered query.
41
+
42
+
### Teardown improvements
43
+
44
+
- Teardown no longer retries exports queries that return empty results — missing exports are set to `<unknown>` and teardown continues best-effort
45
+
- Post-delete existence checks accept the first empty response instead of retrying, reducing teardown time significantly
46
+
47
+
### AWS starter template updated
48
+
49
+
The `stackql-deploy init --provider aws` starter template now uses:
50
+
- `awscc`(Cloud Control) provider instead of `aws`
51
+
- CTE + INNER JOIN exists pattern with `to_aws_tag_filters`
52
+
- `AWS_POLICY_EQUAL`for statecheck tag comparison
53
+
- `this.<field>`identifier capture pattern
54
+
- `RETURNING *`on create statements
55
+
- `stackql:stack-name`/ `stackql:stack-env` / `stackql:resource-name` tag taxonomy
56
+
57
+
### AWS VPC Web Server example
58
+
59
+
Complete rewrite of the `examples/aws/aws-vpc-webserver` stack (renamed from `aws-stack`) using the `awscc` provider exclusively. Includes 10 resources demonstrating all query patterns: tag-based discovery, identifier capture, property-level statechecks, PatchDocument updates, and the `to_aws_tag_filters` filter.
60
+
61
+
### Patch Document Test example
62
+
63
+
New `examples/aws/patch-doc-test` example demonstrating the Cloud Control API `UPDATE` workflow with `PatchDocument` — deploy an S3 bucket, modify its versioning config in the manifest, and re-deploy to apply the update.
64
+
65
+
### Other changes
66
+
67
+
- Fixed `init` command missing `--env` argument (defaulting to `dev`)
68
+
- Added `debug` log import to build command
69
+
- Debug logging now shows full `RETURNING *` payloads
70
+
- Documentation updates: `resource-query-files.md`, `template-filters.md`, `manifest-file.md`, and AWS template library
0 commit comments