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: AGENTS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,6 +195,8 @@ Terraform state reflects what the user cares about, not the entire API response.
195
195
196
196
For generated XML -> model conversions, see `internal/codegen/README.md`, especially the "Preserve User Intent For Optional Nested Objects" section. That generator-level rule is authoritative for optional nested object readback behavior.
197
197
198
+
For codegen overrides, prefer the policy layer in `internal/codegen/policy/field_policy.go`. Add exact field overrides there using named policy functions rather than adding new struct/field special cases in generator templates. Template branches should stay generic unless the behavior is truly structural and cannot be expressed as field policy.
199
+
198
200
**Computed** (not Optional) - Always read from API
Copy file name to clipboardExpand all lines: internal/codegen/README.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,19 +100,29 @@ Examples:
100
100
101
101
### Override strategy
102
102
103
-
When the default rules are not enough, use explicit overrides keyed by full Terraform or XML path rather than helper functions like `isUserManagedFooStruct`.
103
+
When the default rules are not enough, use explicit overrides keyed by exact field identity rather than helper functions like `isUserManagedFooStruct`.
104
+
105
+
Prefer declaring overrides in the policy layer as a registry of named policy functions, for example:
0 commit comments