Hello everyone, I am a beginner in Pulumi and I am...
# google-cloud
b
Hello everyone, I am a beginner in Pulumi and I am testing https://github.com/pulumi/examples/tree/master/gcp-py-network-component I have configured everything well, except that when I do my pulumi up it gives me this : error: Configuration 'gcp-py-network-component:subnet_cidr_blocks' value '172.2.0.0/16' is not a valid 'JSON object' error: an unhandled error occurred: Program exited with non-zero exit code: 1 Do you know the exact syntax to declare a cidr in the pulumi config file? I typed this command : pulumi config set gcp-py-network-component:subnet_cidr_blocks '172.2.0.0/16' And here is the return in my Pulumi.dev.yaml file :
Copy code
config:
gcp-py-network-component:subnet_cidr_blocks: '172.2.0.0/16'
Would you have an idea ? Thanks in advance for your answer
w
Hi @boundless-artist-3489, You need to set the config value for the `subnet_cidr_blocks`` as follows:
pulumi config set --path 'subnet_cidr_blocks[0]' 172.2.0.0/16
This is because the code is written such that it is looking for a structured configuration setting so as to allow one to configure multiple subnet CIDRs. (See https://www.pulumi.com/docs/intro/concepts/config/#structured-configuration for more info.) Regardless, I’ll submit an update to the example so that the README provides this instruction.
b
Yes i try this at the moment it's work thank you so much for your response 🙂