pulumi/pkg/resource/config
Matt Ellis 72d52c6e1f Don't fail on configuration keys like a:config:b:c
Configuration keys are simple namespace/name pairs, delimited by
":". For compatability, we also allow
"<namespace>:config:<name>", but we always record the "nice" name in
`Pulumi.<stack-name>.yaml`.

While `pulumi config` and friends would block setting a key like
`a🅱️c` (where the "name" has a colon in it), it would allow
`a:config:b:c`. However, this would be recorded as `a🅱️c` in
`Pulumi.<stack-name>.yaml`, which meant we'd error when parsing the
configuration file later.

To work around this, disallow ":" in the "name" part of a
configuration key.  With this change the following all work:

```
keyName
my-project:keyName
my-project:config:keyName
```

However, both

`my-project:keyName:subKey`
`my-project:config:keyName:subKey`

are now disallowed.

I considered allowing colons in subkeys, but I think it adds more
confusion (due to the interaction with how we allow you elide the
project name in the default case) than is worthwhile at this point.

Fixes #2171
2018-11-20 14:14:37 -08:00
..
crypt.go Add license headers 2018-05-22 15:02:47 -07:00
key.go Don't fail on configuration keys like a:config:b:c 2018-11-20 14:14:37 -08:00
key_test.go Don't fail on configuration keys like a:config:b:c 2018-11-20 14:14:37 -08:00
map.go Add license headers 2018-05-22 15:02:47 -07:00
map_test.go Add license headers 2018-05-22 15:02:47 -07:00
value.go Add license headers 2018-05-22 15:02:47 -07:00
value_test.go Add license headers 2018-05-22 15:02:47 -07:00