Go SDK deprecation and migration #2078
danielrbradley
announced in
Announcements
Replies: 1 comment 1 reply
-
I just came here because a Go project I work on imports both repos, probably unknowingly. I don't believe we're getting the error listed here, I may be wrong though but hasn't caused any issues at least. Shouldn't pulumi-azure-native-sdk be called pulumi-azure-native-go-sdk or something? Do you reccomend I migrate? Thx! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Azure releases many versions of their services and the Azure Native Pulumi provider provides an API to interact with every version via its use of version-specific resources. This has resulted in growth of our Go SDK which will soon make it too large to be referenced from the Go module proxy which has a 500MiB module limit.
We’ve released the github.com/pulumi/pulumi-azure-native-sdk to mitigate this issue. This new SDK brings with it the following changes:
Migration instructions
To migrate you need to update all your Pulumi Azure imports. See the end of this post for a script to do this replacement automatically. Alternatively, you can change every import in your Pulumi Go program as follows:
Note: For any import of
github.com/pulumi/pulumi-azure-native/sdk/go/azure
, change to “github.com/pulumi/pulumi-azure-native-sdk” and also add the alias “azure” if it doesn’t already have an alias as its module name is changing.Run
go mod tidy
once all replacements are completed. If all imports have been replaced,github.com/pulumi/pulumi-azure-native/sdk/go/
should no longer appear in yourgo.mod
. It's not possible to use both the old and new SDKs alongside each other.Possible Errors
If you receive the error
existing registration for azure-native
during deployment, it likely means that there are references to both the old and new SDKs. All references to the old SDK must be removed.Automatic Replacement Script
The following script will replace each possible module reference. This should be run inside the folder of your Pulumi Go program.
This should fix the majority of renames, however it doesn't cover:
github.com/pulumi/pulumi-azure-native/sdk/go/azure
)github.com/pulumi/pulumi-azure-native/sdk/go/azure/aad/v20210501
)Beta Was this translation helpful? Give feedback.
All reactions