Skip to content

Commit

Permalink
Fix some casing in resource options
Browse files Browse the repository at this point in the history
  • Loading branch information
Frassle committed Nov 19, 2024
1 parent 61b83d7 commit 584b5c8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Bug Fixes-690.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
component: codegen
kind: Bug Fixes
body: Fix casing of `dependsOn` and `ignoreChanges` in program generation
time: 2024-11-19T09:27:55.604415606Z
custom:
PR: "690"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resources:
properties:
value: true
options:
dependson:
dependsOn:
- ${failing}
dependent_on_output:
type: simple:Resource
Expand All @@ -23,6 +23,6 @@ resources:
properties:
value: true
options:
dependson:
dependsOn:
- ${independent}
- ${dependent_on_output}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resources:
properties:
value: true
options:
dependson:
dependsOn:
- ${dep}
dep:
type: simple:Resource
Expand Down
4 changes: 2 additions & 2 deletions pkg/pulumiyaml/codegen/gen_program.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (g *generator) genResourceOpts(opts *pcl.ResourceOptions) *syn.ObjectNode {
elems := g.expr(opts.DependsOn)
_, ok := elems.(*syn.ListNode)
contract.Assertf(ok, "Expected a list node, got %T", elems)
rOpts = append(rOpts, syn.ObjectProperty(syn.String("dependson"), elems))
rOpts = append(rOpts, syn.ObjectProperty(syn.String("dependsOn"), elems))
}
if opts.IgnoreChanges != nil {
elems := g.expr(opts.IgnoreChanges).(*syn.ListNode)
Expand All @@ -222,7 +222,7 @@ func (g *generator) genResourceOpts(opts *pcl.ResourceOptions) *syn.ObjectNode {
ignoreChanges[i] = unquoteInterpolation(elems.Index(i))
}
list := syn.ListSyntax(elems.Syntax(), ignoreChanges...)
rOpts = append(rOpts, syn.ObjectProperty(syn.String("ignorechanges"), list))
rOpts = append(rOpts, syn.ObjectProperty(syn.String("ignoreChanges"), list))
}
if opts.Protect != nil {
expr := mustCoerceBoolean(g.expr(opts.Protect))
Expand Down

0 comments on commit 584b5c8

Please sign in to comment.