Skip to content

Commit

Permalink
Fix some casing in resource options (#690)
Browse files Browse the repository at this point in the history
Noticed these warning while running conformance tests. Nothing's testing
ignoreChanges yet but it's an obvious fix.
  • Loading branch information
Frassle authored Nov 19, 2024
1 parent 61b83d7 commit fcea5fb
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 12 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
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ resources:
containerName: my-app
containerPort: 80
options:
dependson:
dependsOn:
- ${webListener}
variables:
# Read the default VPC and public subnets, which we will use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ resources:
containerName: my-app
containerPort: 80
options:
dependson:
dependsOn:
- ${webListener}
variables:
# Read the default VPC and public subnets, which we will use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ resources:
type: aws:s3:Bucket
options:
provider: ${provider}
dependson:
dependsOn:
- ${provider}
ignorechanges:
ignoreChanges:
- bucket
- lifecycleRules[0]
protect: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ resources:
type: aws:s3:Bucket
options:
provider: ${provider}
dependson:
dependsOn:
- ${provider}
ignorechanges:
ignoreChanges:
- bucket
- lifecycleRules[0]
protect: true
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resources:
contentType: text/html
acl: public-read
options:
dependson:
dependsOn:
- ${publicAccessBlock}
- ${ownershipControls}
outputs:
Expand Down

0 comments on commit fcea5fb

Please sign in to comment.