Programmatically set the default providers
From @geekflyer on Slack: > Hi, is there a way to programmatically *set* a global default provider or (programmatically set a root resource which contains this provider)?? The concrete issue is the following: Currently in my stacks I’m programmatically creating a k8s provider that should be used as the deployment target for all resources in that stack. In order to use this dynamically created provider, however, I have pass it explicitly to each k8s resource that is created in that stack OR I have to explicitly set a common parent on each resource in that stack and set the k8s provider on that parent. *If I accidentally forget to explicitly set the provider or parent on one of the resources, pulumi seems to create an implicit k8s provider based on my local kubectl config / context*. Depending on what my current local kubectl context contains, pulumi may end up silently deploying resources to a different cluster than what I actually want. It would be very helpful if I could disable or override this “implicit default provider” programmatically in the entrypoint of my program. (edited)
Posted by lukehoban on Oct 15, 2018, 2:09 PM
Tags
Related issues
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
github (E-commerce)
proposal: cmd/cgo: cgo without a C toolchain
Replace PowerToys Run with Command Palette
VPS with a vRack leg
Possibility of Portal 1 Code Inclusion
Introducing NewPlayer
Metrics for PRs are never expiring ("memory leak")
ship even more of the compiler in source form
Flatpak Application TRACKING ISSUE
Programmatically set the default providers
From @geekflyer on Slack: > Hi, is there a way to programmatically *set* a global default provider or (programmatically set a root resource which contains this provider)?? The concrete issue is the following: Currently in my stacks I’m programmatically creating a k8s provider that should be used as the deployment target for all resources in that stack. In order to use this dynamically created provider, however, I have pass it explicitly to each k8s resource that is created in that stack OR I have to explicitly set a common parent on each resource in that stack and set the k8s provider on that parent. *If I accidentally forget to explicitly set the provider or parent on one of the resources, pulumi seems to create an implicit k8s provider based on my local kubectl config / context*. Depending on what my current local kubectl context contains, pulumi may end up silently deploying resources to a different cluster than what I actually want. It would be very helpful if I could disable or override this “implicit default provider” programmatically in the entrypoint of my program. (edited)
Comments (0)
No comments yet. Start the discussion.