How do I set a map with `pulumi config set`? I got...
# general
i
How do I set a map with
pulumi config set
? I got the command to work but running the program failed:
Copy code
> pulumi config set --path 'aws:defaultTags.tags' '{"user:Project": "my_project"}'
error: pulumi:providers:aws resource 'default_6_9_0' has a problem: could not validate provider configuration: Attribute must be a map. Check `pulumi config get --path aws:defaultTags.tags`
other things I've tried:
Copy code
> pulumi config set --path 'aws:defaultTags.tags.["user:Project"]' my_project
error: invalid configuration key: could not parse aws:defaultTags.tags.["user:Project"] as a configuration key (configuration keys should be of the form `<namespace>:<name>`)
--
Copy code
> pulumi config set --path 'aws:defaultTags.tags.user:Project' my_project
# same error as above
--
Copy code
> pulumi config set --path 'aws:defaultTags.tags.test' true
error: defaultTags.tags: expected a map
l
Hello @icy-controller-6092, the following commands:
Copy code
$ pulumi config set --path 'aws:defaultTags.tags.key' value
$ pulumi config set --path 'aws:defaultTags.tags.otherkey' othervalue
give me the following stack config:
Copy code
config:
  aws:defaultTags:
    tags:
      key: value
      otherkey: othervalue
The problem for you is that your
key
contains a colon (
user:Project
). This seems to confuse our argument parsing. Can you file an issue for this? https://github.com/pulumi/pulumi/issues
i
Hey Ringo, that’s the same format I used for the last command, but I still got the error. This was with a blank yaml so that might be the difference