sparse-intern-71089
05/28/2019, 11:12 AMbroad-dog-22463
05/28/2019, 11:18 AMfaint-motherboard-95438
05/28/2019, 12:01 PM"@pulumi/gcp": "0.16.3",
"@pulumi/kubernetes": "0.22.2",
"@pulumi/pulumi": "0.17.6"
faint-motherboard-95438
05/28/2019, 12:15 PMopts
key providers
of a ComponentResource
has changed from <string, Provider>
to <string, ProviderResource>
broad-dog-22463
05/28/2019, 12:19 PMbroad-dog-22463
05/28/2019, 12:20 PMfaint-motherboard-95438
05/28/2019, 12:22 PMstocky-spoon-28903
05/28/2019, 12:22 PMstocky-spoon-28903
05/28/2019, 12:22 PMfaint-motherboard-95438
05/28/2019, 12:23 PMv0.17.12
stocky-spoon-28903
05/28/2019, 12:27 PMfaint-motherboard-95438
05/28/2019, 12:40 PMnpm i
or change anything dependency related. It was still working a few days ago.faint-motherboard-95438
05/28/2019, 12:42 PMProviderResource
to all my components ?
Up until now I was passing those 2 providers :
const k8sProvider = new k8s.Provider(
`${prefix}-k8s-provider`,
{ kubeconfig: clusterStack.getOutput('kubeConfig') },
)
const gcpProvider = new gcp.Provider(
`${prefix}-gcp-provider`,
{
credentials: gcpStack.getOutput('clusterAdminKey'),
project: gcp.config.project,
zone: gcp.config.zone,
region: gcp.config.region,
},
)
const providers = {
gcp: gcpProvider,
kubernetes: k8sProvider,
}
faint-motherboard-95438
05/28/2019, 1:58 PMProvider
is extended from a ProviderResource
, so that should be ok as it has always be, I don’t understand why I have a ts error nowfaint-motherboard-95438
05/28/2019, 2:57 PMTSError: ⨯ Unable to compile TypeScript:
index.ts(41,5): error TS2322: Type '{ gcp: Provider; }' is not assignable to type 'Record<string, ProviderResource>'.
Property 'gcp' is incompatible with index signature.
Type 'Provider' is not assignable to type 'ProviderResource'.
Types of property 'id' are incompatible.
Type 'import("/[...]/node_modules/@pulumi/gcp/node_modules/@pulumi/pulumi/output").Output<string>' is not assignable to type 'import("/[...]/node_modules/@cappalyst/pulumi/node_modules/@pulumi/pulumi/output").Output<string>'.
Property 'length' is missing in type 'Output<string>' but required in type 'LiftedObject<String, number | "length">'.
index.ts(83,5): error TS2322: Type '{ gcp: Provider; }' is not assignable to type 'Record<string, ProviderResource>'.
Property 'gcp' is incompatible with index signature.
Type 'Provider' is not assignable to type 'ProviderResource'.
Types of property 'id' are incompatible.
Type 'import("/[...]/node_modules/@pulumi/gcp/node_modules/@pulumi/pulumi/output").Output<string>' is not assignable to type 'import("/[...]/node_modules/@pulumi/pulumi/output").Output<string>'.
Property 'length' is missing in type 'Output<string>' but required in type 'LiftedObject<String, number | "length">'.
faint-motherboard-95438
05/28/2019, 2:59 PMstocky-spoon-28903
05/28/2019, 3:11 PMstocky-spoon-28903
05/28/2019, 3:11 PMfaint-motherboard-95438
05/28/2019, 3:16 PMProvider
to any component fails during the TS compilation with the previous error)stocky-spoon-28903
05/28/2019, 3:20 PMbig-piano-35669
Provider
subclasses ProviderResource
, AFAIK, so it should be substitutable. Based on the error
Type '{ gcp: Provider; kubernetes: Provider; }' is not assignable to type 'Record<string, ProviderResource>'
I wonder, are gcp
and kubernetes
strings? In other words, something like this
{
"gcp": new gcp.Provider(),
"kubernetes": new k8s.Provider(),
}
rather than
{
gcp: new gcp.Provider(),
kubernetes: new k8s.Provider(),
}
Just a guess based on the errors. If this isn't it, then a minimal repro would definitely help.faint-motherboard-95438
05/29/2019, 7:54 AMnode_modules
, brew uninstall pulumi
, removed all plugins and reinstalled everything to the latest version.
That’s a weird issue that things get messy like that without having changed anything on my side. That’s not the first time though I have issues related to an minor package upgrade an inconsistency between a pulumi node module and a pulumi plugin related to the CLI.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by