https://pulumi.com logo
#general
Title
# general
q

quick-greece-34196

04/20/2020, 2:32 AM
Hi there 🙂. I need help concerning a k8s provider and component resource in a child stack. I am importing resources from a parent stack and creating a provider like so:
Copy code
const k8sProvider = new k8s.Provider(`${prefix}-k8s-provider`, {
  kubeconfig: clusterStack.getOutput("kubeConfig"),
});

...

const providers = {
  gcp: gcpProvider,
  kubernetes: k8sProvider,
}
and then passing it to a component resource:
Copy code
const externalDNS = new ExternalDNS(
  `${prefix}-external-dns`,
  {
    labels,
    domain,
    zonePolicy: "sync",
    nodeSelector: {
      [`${domain}/nodeType`]: "main"
    }
  },
  { providers },
  );
I am getting an error that seems to indicate the provider is wrong ? Any pointers I can use, I am out of ideas...
Copy code
error: Missing required configuration variable 'customer-services:k8sMasterPassword'
        please set a value using the command `pulumi config set customer-services:k8sMasterPassword <value>`
f

faint-motherboard-95438

04/20/2020, 12:38 PM
Hi @quick-greece-34196, I think your problem is the error is misleading. Giving
customer-services
is your current pulumi project, you should do :
Copy code
pulumi config set k8sMasterPassword <value>
the prefix in the key is not supposed to be there. Giving the name of your key, you should also set it as a secret :
Copy code
pulumi config set k8sMasterPassword <value> --secret
q

quick-greece-34196

04/20/2020, 12:43 PM
Thanks @faint-motherboard-95438 I will try that.