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
When attempting to create a default config in Pulumi.yaml as follows:
config:
foo:
bar: foobar
we receive the following error:
error: could not validate '/Pulumi.yaml': 7 errors occurred:
* #/config/foo: oneOf failed
* #/config/foo: expected string, but got object
* #/config/foo: expected integer, but got object
* #/config/foo: expected boolean, but got object
* #/config/foo: expected array, but got object
* #/config/foo: doesn't validate with '/$defs/configTypeDeclaration'
* #/config/foo: additionalProperties 'bar' not allowed
This same configuration declaration works fine in Pulumi.{stack}.yaml.
There is a workaround with an odd syntax:
config:
foo:
value:
bar: foobar
But, typing of a key does not work either:
config:
policies:
type: array
secret: false
Resulting in the following error:
error: could not unmarshal 'Pulumi.yaml': The configuration key 'policies' declares an array but does not specify the underlying type via the 'items' attribute
Example
see above
Output of pulumi about
3.113.3
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
I also been confused by the difference schema of project level & stack level configuration.
stack config is just values, project config is values and types/schema. That necessitates some changes in how they're written.
There is a workaround with an odd syntax:
We did consider making this syntax consistent and requiring it for simple values like strings/numbers as well but err'd on keeping simple values simple. We need this nesting under a "value" key for objects though so we can tell the difference between "here's just an object value" and "here's an object describing a schema".
But, typing of a key does not work either: ... Resulting in the following error:
I think that error's fairly clear? You need to set "items" to tell the system what the type of items in the array is.
What happened?
When attempting to create a default config in Pulumi.yaml as follows:
we receive the following error:
This same configuration declaration works fine in Pulumi.{stack}.yaml.
There is a workaround with an odd syntax:
But, typing of a key does not work either:
Resulting in the following error:
Example
see above
Output of
pulumi about
3.113.3
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: