Channels
welcome
pulumi-cdk
cloudengineering
yaml
blog-posts
localstack
pulumi-ai
package-authoring
general
pulumiup-booth-support
oracle-cloud-infrastructure
learn-pulumi-events
linen
registry
built-with-pulumi
pulumi-cloud
contribex
testingtesting321
hacktoberfest
pulumi-crosscode
content-share
finops
multi-language-hackathon
office-hours
workshops
gitlab
pulumi-kubernetes-operator
jobs
pulumi-deployments
dotnet
aws
golang
announcements
java
pulumiverse
python
install
getting-started
cloudengineering-support
testingtesting123
hackathon-03-19-2020
typescript
google-cloud
contribute
azure
kubernetes
docs
automation-api
status
Powered by
#kubernetes
Title
i
important-vegetable-39003
12/10/2021, 4:52 PM
Hi folks, does anyone know how to specify the cluster through code when creating a resource?
b
billowy-army-68599
12/10/2021, 5:16 PM
hi Rokas, can you clarify a little bit what you mean?
i
important-vegetable-39003
12/10/2021, 7:21 PM
I have multiple clusters defined and would like to prompt input to select one.
Using the API, how can I specify a cluster to use
b
billowy-army-68599
12/10/2021, 7:27 PM
You can set the provider for every resource:
https://www.pulumi.com/docs/intro/concepts/resources/#providers
See explicit provider configuration
https://www.pulumi.com/registry/packages/kubernetes/api-docs/provider/
i
important-vegetable-39003
12/10/2021, 8:00 PM
So when I call the provider it'll internally set to the specified one?
Or do I have to assign it to a var and use it somehow?
b
billowy-army-68599
12/10/2021, 8:02 PM
you have to pass it to your resources as a resource option
i
important-vegetable-39003
12/10/2021, 8:15 PM
Oh, it's part of opts, I see
Thanks
4 Views
Post