Closed julienfouilhe closed 1 month ago
Hey @julienfouilhe. I'm sorry to hear that. Can you post a program that reproduces the panic so we can fix it?
Hi,
It actually seems not to be linked with the upgrade to v7 but to the declaration of
new gcp.identityplatform.Config("idpconfig", {
authorizedDomains: ["localhost", domain],
project: gcp.config.project ?? "",
signIn: {
allowDuplicateEmails: false,
phoneNumber: {
enabled: true,
testPhoneNumbers,
},
},
});
I migrated to this from a deprecated similar resource, and testPhoneNumbers
was set to config.requireObject("testPhoneNumbers")
. My stack yaml was configured this way:
infrastructure:testPhoneNumbers:
- "+16505552775": 000000
Which returned an array of key value objects, instead of that way:
infrastructure:testPhoneNumbers:
"+16505552775": 123456
which returns directly an object, which is what is expected. I would have expected requireObject or typescript to complain but it seemed like everything was fine.
@julienfouilhe Thanks for explaining, that makes it much easier to understand.
We can fully reproduce the bug in GCP with this program:
import * as gcp from "@pulumi/gcp";
const testPhoneNumbers: any = [{ "+16505552775": "000000" }];
new gcp.identityplatform.Config("idpconfig", {
signIn: {
phoneNumber: {
enabled: true,
testPhoneNumbers,
},
},
});
The bug for the crash is https://github.com/pulumi/pulumi-terraform-bridge/issues/1328.
The bug for the implicit type cast is https://github.com/pulumi/pulumi/issues/8520.
This was fixed in https://github.com/pulumi/pulumi-terraform-bridge/issues/1328
the error message now explains the issue:
gcp:identityplatform:Config (idpconfig):
warning: Type checking failed:
warning: Unexpected type at field "signIn.phoneNumber.testPhoneNumbers":
expected object type, got [] type
warning: Type checking is still experimental. If you believe that a warning is incorrect,
please let us know by creating an issue at https://github.com/pulumi/pulumi-terraform-bridge/issues.
This will become a hard error in the future.
error: Preview failed: diffing urn:pulumi:dev::gcp_1548::gcp:identityplatform/config:Config::idpconfig: panicked: "value has no attribute of that name"
What happened?
I upgraded to v7.6.0 and after upgrading faced multiple errors when running
pulumi up
. I run into it for a single stack, my other stacks could be upgraded fine (they mostly declare the same resources, it's just a different environment) The error changes a little bit sometimes, but the go stacktrace remains. If I run up with--skip-preview
, I get the same error.Example
Output of
pulumi about
Additional context
No response
Contributing
No response