Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some casing in resource options #690

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading