Hi folks ! I have a shell script which triggers a ...
# google-cloud
k
Hi folks ! I have a shell script which triggers a pulumi execution provisioning some input data (like the stack name, and a few other things). The pulumi script itself creates the environment and spins up a gke cluster on gcp. Now, in the pulumi context some data need to be dynamic, like the `ip_cidr_range`of the subnet I need (which is now statically provided). Is there a programmatic way to get a valid address range selected or should I make a script which tries one until it’s successfully created ?
g
I think you can use
getNetblockIpRanges
to pull down the valid ranges from your network to pass to the subnet. Note that I haven't tried this directly on production systems. See https://www.pulumi.com/registry/packages/gcp/api-docs/compute/getnetblockipranges/ (if you're using the classic GCP provider)
k
Thanks for the suggestion, I'tt try
👍 1