gorgeous-pillow-81622
03/13/2023, 5:01 PMpulumi plugin install
.
When running pulumi plugin install
, it fails with:
error: [resource plugin azure-native-sdk-1.95.0] downloading from : failed to download plugin: azure-native-sdk-1.95.0: 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-azure-native-sdk-v1.95.0-darwin-arm64.tar.gz>
Which is expected as the plugin name is azure-native
, not azure-native-sdk
.
I had a look at Pulumi code, and if I'm not mistaken, the issue is the following one:
go list -m -json -mod=mod all
....
....
{
"Path": "<http://github.com/pulumi/pulumi-azure-native-sdk|github.com/pulumi/pulumi-azure-native-sdk>",
"Version": "v1.95.0",
"Time": "2023-02-13T15:33:12Z",
"Dir": "/Users/vincent.boulineau/Documents/Dev/Go/pkg/mod/github.com/pulumi/pulumi-azure-native-sdk@v1.95.0",
"GoMod": "/Users/vincent.boulineau/Documents/Dev/Go/pkg/mod/cache/download/github.com/pulumi/pulumi-azure-native-sdk/@v/v1.95.0.mod",
"GoVersion": "1.17"
}
{
"Path": "<http://github.com/pulumi/pulumi-azure-native-sdk/compute|github.com/pulumi/pulumi-azure-native-sdk/compute>",
"Version": "v1.95.0",
"Time": "2023-02-13T15:33:12Z",
"Dir": "/Users/vincent.boulineau/Documents/Dev/Go/pkg/mod/github.com/pulumi/pulumi-azure-native-sdk/compute@v1.95.0",
"GoMod": "/Users/vincent.boulineau/Documents/Dev/Go/pkg/mod/cache/download/github.com/pulumi/pulumi-azure-native-sdk/compute/@v/v1.95.0.mod",
"GoVersion": "1.17"
}
....
....
There's a pulumi-plugin.json
giving the name azure-native
at Go/pkg/mod/github.com/pulumi/pulumi-azure-native-sdk@v1.95.0/pulumi-plugin.json
But there isn't any at Go/pkg/mod/github.com/pulumi/pulumi-azure-native-sdk/compute@v1.95.0/pulumi-plugin.json
Hence, it returns azure-native-sdk
as a plugin name, which, in fact, does not exist
(Still the same with `1.97.0`: https://github.com/pulumi/pulumi-azure-native-sdk/tree/master/compute)
I believe the fix is to emit a pulumi-plugin.json
for all generated split package, which implies modifying this function: https://github.com/pulumi/pulumi-azure-native/blob/master/provider/cmd/pulumi-gen-azure-native/main.go#L257-L270
I can open a PR for that but I'd like to check that is the preferred way to fix, as I can also see some other ways to fix it.witty-candle-66007
03/16/2023, 3:50 PMgorgeous-pillow-81622
03/16/2023, 3:51 PM