pulumi / pulumi-yaml

YAML language provider for Pulumi
Apache License 2.0
39 stars 12 forks source link

Error after setting config to an object, even when unused by program #450

Open AaronFriel opened 1 year ago

AaronFriel commented 1 year ago

What happened?

As user @faudsaud discovered, setting complex types in config:

# Stack config file
config:
  aws:assumeRole:
    roleArn: test

Results in an error during execution:

    error: an unhandled error occurred: 1 error occurred:
        * <nil>: 1 error occurred:
        * unexpected configuration type 'map[string]interface {}': valid types are string, List<string>, number, List<number>, integer, List<integer>, boolean, List<number>

Expected Behavior

If the program is not using aws:assumeRole as a config key, I'd expect not to have to declare it in structured config.

Steps to reproduce

Create a project via pulumi new yaml, set the Pulumi.dev.yaml config to:

config:
  aws:assumeRole:
    roleArn: test

Run pulumi up.

Output of pulumi about

n/a

Additional context

A workaround for using aws:assumeRole.roleArn is described here:

https://github.com/pulumi/pulumi-yaml/issues/434#issuecomment-1519177770

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).

abhinav commented 1 year ago

@AaronFriel I've marked this as an enhancement rather than a bug because as far as I can tell, this is new functionality. Please let me know if that's inaccurate.

AaronFriel commented 1 year ago

@abhinav I think this is a bug as it's a regression from a previous release, but I have not bisected.

abhinav commented 1 year ago

Ack. Will correct the label.