https://pulumi.com logo
Title
f

fancy-bird-54024

08/27/2022, 11:05 AM
Hello team I found
pulumi new
has a
--config stringArray
option. But it seems not say what
stringArrary
should look like. I try
--config aws:region:us-east-1
but it complains a error: (my terminal is PowerShell)
error: could not parse aws:region:us-east-1 as a configuration key (configuration keys should be of the form `<namespace>:<name>`)
so what it should look like?
"aws:region:us-east-1"
or
aws:region us-east-1
(will complain too much args) seems both not the correct answer. Thanks~
b

brainy-church-78120

08/27/2022, 6:52 PM
hi @fancy-bird-54024! can you share a little bit more about what you are trying to do?
f

fancy-bird-54024

08/28/2022, 4:42 AM
@brainy-church-78120 Sure. I want to create new project with
pulumi new aws-java --name xxx --stack dev --description xxxx --config someconfigurationhere
. If I omit
--config
part, the Pulumi will ask me to input with
aws:region: The AWS region to deploy into: (us-east-1)
message. SO I guess maybe I can manual add this required field in advance within the
pulumi new
command line. And maybe
--config
option, could help me directly to fill this field as
--config aws:region:ap-east-1
or whatever format. But when I input
pulumi new -h
to search the format, the helper info show
-c, --config stringArray        Config to save
in the Flags. I try
"aws:region:ap-east-1"
and
aws:region ap-east-1
but it seems not correct format, SO I wonder how it
stringArray
should look like in PowerShell , and whether I could use this option to skip that interactive input procedure.(I am not a native English speaker, sorry for my Grammar. Hope I can express my thoughts 😂)
b

brainy-church-78120

08/28/2022, 4:33 PM
so ur goal is to not have to provide values in the interactive prompts? i also tried a whole bunch of ways to get this to work and couldn't figure it out. I've asked for some help internally, should be able to get back to you with a better answer tomorrow.
b

billowy-army-68599

08/28/2022, 5:51 PM
if I do
pulumi new typescript --config="foo=bar"
i end up with
cat Pulumi.dev.yaml
config:
  project:foo: bar
If I do:
pulumi new aws-typescript --config="aws:region=us-west-2"
i end up with
config:
  aws:region: us-west-2
final example:
pulumi new aws-typescript --config="aws:region=us-west-2" --config="foo=bar"
cat Pulumi.dev.yaml
config:
  aws:region: us-west-2
  project:foo: bar
b

brainy-church-78120

08/28/2022, 5:59 PM
ah so the equal sign is the correct syntax, thank you!
f

fancy-bird-54024

08/29/2022, 1:14 AM
Yeah, equal sign with multiple config block. That's what I wanted, Thank you very much~~👍