Hello, i'm disabled the default k8s provider, and ...
# kubernetes
Hello, i'm disabled the default k8s provider, and now i'm getting the following error when running the code below:
let secrets: pulumi.Output<output.core.v1.ObjectReference[]> = k8s.core.v1.ServiceAccount.get("ksa-".concat(ksa.name),resourceId).secrets;
Copy code
error: Error: failed to read resource #thx/shared-db-password 'ksa-shared-db-password' [kubernetes:core/v1:ServiceAccount]: 2 UNKNOWN: Default provider for 'kubernetes:core/v1:ServiceAccount' disabled. 'kubernetes:core/v1:ServiceAccount' must use an explicit provider.
looking at the
api it doesn't allow you to set the k8s provider. i believe this is the same issue as https://github.com/pulumi/pulumi-kubernetes/issues/1945 ?
You should be able to set the provider on the resource options. Something like this:
Copy code
let secrets: pulumi.Output<output.core.v1.ObjectReference[]> = k8s.core.v1.ServiceAccount.get("ksa-".concat(ksa.name),resourceId, {provider: myProvider}).secrets;
👍 1
@gorgeous-egg-16927 i didn't look at the type definition very carefully but this is exactly what i was looking for. thanks!
👍 2