@@ -6,6 +6,8 @@ uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66
77## [ Unreleased]
88
9+ ## [ 0.2.1] - 2026-07-28
10+
911### Added
1012
1113- ` --show-delta ` flag for ` c3x estimate ` : shows only resources with
@@ -14,21 +16,26 @@ uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1416 cost delta line. Only meaningful for plan JSON input; warns and falls
1517 back to the standard view when used with ` .tf ` files.
1618- ` optional() ` type-constraint defaults are now resolved for both root
17- and child module variables, matching Terraform's runtime behavior.
18- Previously, attributes using ` optional(type, default) ` could resolve
19- to nil or a source-range string, causing type mismatches in catalog
20- expressions.
19+ and child module variables through Terraform's own ` typeexpr ` type
20+ system. Explicit ` optional(type, default) ` defaults are applied, bare
21+ ` optional(type) ` attributes materialize as null, and ` map ` /` list ` of
22+ ` object(...) ` wrappers are handled — matching Terraform's runtime
23+ behavior instead of bespoke, partial extraction.
2124
2225### Fixed
2326
2427- Plan parser: ` provider_config.expressions ` no longer panics on
2528 array-valued expressions (e.g. azurerm ` features ` block in
2629 Terraform 4.x). Uses ` json.RawMessage ` with graceful skip.
27- - ` optional_defaults.go ` : no longer panics on zero-arg ` object() ` type
28- constraints in HCL.
29- - ` optional(object({...})) ` without an explicit default no longer
30- synthesizes a phantom object from child defaults — matching
31- Terraform's behavior of leaving the attribute null.
30+ - Registry modules that assign an attribute through an ` optional() `
31+ object input now reflect the real value instead of silently falling
32+ back to the catalogue default. Previously an input typed
33+ ` map(object({ instance_class = optional(string) })) ` left the
34+ attribute absent, so an expression like
35+ `try(coalesce(each.value.instance_class, var.cluster_instance_class),
36+ null)` errored on the missing attribute, ` try()` swallowed it to null,
37+ and the resource priced at the default class — the delta column missed
38+ the change entirely (e.g. terraform-aws-modules/rds-aurora). (#53 )
3239
3340## [ 0.1.0] - 2026-06-22
3441
0 commit comments