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

Parse the items property on config type declarations #615

Merged
merged 1 commit into from
Aug 26, 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
3 changes: 3 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
- [features] add "pulumi.organiztion" to the built-in "pulumi" variable to obtain the current organization.

### Bug Fixes

- Parse the items property on config type declarations to prevent diagnostic messages about
unknown fields [#615](https://github.com/pulumi/pulumi-yaml/pull/615)
1 change: 1 addition & 0 deletions pkg/pulumiyaml/ast/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ type ConfigParamDecl struct {
Secret *BooleanExpr
Default Expr
Value Expr
Items *ConfigParamDecl
}

func (d *ConfigParamDecl) recordSyntax() *syntax.Node {
Expand Down
17 changes: 17 additions & 0 deletions pkg/pulumiyaml/ast/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ import (
const example = `
name: simple-yaml
runtime: yaml
config:
some-string-array:
type: array
value:
- subnet1
- subnet2
- subnet3
items:
type: string
some-nested-array:
type: array
items:
type: array
items:
type: string
some-boolean:
type: boolean
resources:
my-bucket:
type: aws:s3/bucket:Bucket
Expand Down
Loading