pulumi
pulumi copied to clipboard
"Failed to Unmarshall Output URL" Error on Successful Pulumi Update
What happened?
During the execution of a Pulumi update operation using a custom Go automation script, the process ends with an error message "Failed to unmarshall output URL", despite the Pulumi operation itself successfully creating, updating, and deleting resources. This issue leads to the Go automation script interpreting the entire operation as a failure, reflected by a non-zero exit code, which contradicts the successful execution of resource changes by Pulumi.
Example
Outputs:
+ stackOutput: {
+ cloudFront: {
+ distributions: {
+ dashboard: {
+ cachePolicy: {
+ dev-default-CdnCachePolicyCors: "bxxxxxef-9447-xxxxxxx-dfe6d4axxxxxx"
}
+ id : "xxxxxxxxxxx"
}
}
}
+ s3 : {
+ buckets: {
+ liveconnect-dashboard-dev : {
+ domain: "liveconnect-dashboard-dev.s3.ap-southeast-1.amazonaws.com"
}
+ liveconnect-dashboard-dev-2024-01-25-16-39: {
+ domain: "liveconnect-dashboard-dev-2024-01-25-16-39.s3.ap-southeast-1.amazonaws.com"
}
}
}
}
Resources:
+ 3 created
~ 1 updated
4 changes. 9 unchanged
Duration: 4m32s
Update succeeded!
**Failed to unmarshall output URL**
Output of pulumi about
CLI
Version 3.96.2
Go Version go1.21.4
Go Compiler gc
Host
OS ubuntu
Version 22.04
Arch x86_64
Backend
Name pulumi.com
URL https://app.pulumi.com
User Unknown
Organizations
Token type personal
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
Hi @mickey0425, if you adapted one of the examples it is likely that the issue is towards the end of your main function. The examples read the output from the pulumi program like this:
// get the URL from the stack outputs
url, ok := res.Outputs["websiteUrl"].Value.(string)
if !ok {
fmt.Println("Failed to unmarshall output URL")
os.Exit(1)
}
(from the inline program example)
If you changed the name or types of the outputs of the pulumi program (what you pass to ctx.Export), you need to update the unmarshalling code to match it.
Could you please check if this is the cause here? If not, would it be possible to provide some code showing the failing output reading?
Since we haven't heard back, I'll go ahead and close the issue as non-actionable. If the problem is still relevant, please provide further details as requested above.