https://pulumi.com logo
#getting-started
Title
# getting-started
c

calm-action-78008

08/25/2023, 10:35 AM
I'm unable to disable the default providers, adding this to
Pulumi.yaml
Copy code
name: abc
runtime: nodejs
description: A minimal Kubernetes TypeScript Pulumi program
pulumi:disable-default-providers: ["*"]
I would like to force all resources to explicitly use a provider. But when I run
pulumi up
, it still uses the default provider, instead of producing an error message. Am I doing something wrong? Example code:
Copy code
const deployment = new k8s.apps.v1.Deployment("nginx", {
    spec: {
        selector: { matchLabels: appLabels },
        replicas: 1,
        template: {
            metadata: { labels: appLabels },
            spec: { containers: [{ name: "nginx", image: "nginx" }] }
        }
    }
}); // is missing explicit provider
b

billowy-army-68599

08/25/2023, 1:48 PM
@calm-action-78008 i think this only works at the stack level, so would need to be added to
Pulumi.<stackname>.yaml
c

calm-action-78008

08/25/2023, 2:58 PM
That doesn't work either, unfortunately. I read that the feature is in "developer preview" (since 2020?) so maybe it's just not well-supported.
b

billowy-army-68599

08/25/2023, 2:58 PM
could you open an issue?