Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix azure loader issues #1682

Merged
merged 3 commits into from
Feb 9, 2024
Merged

Fix azure loader issues #1682

merged 3 commits into from
Feb 9, 2024

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Feb 9, 2024

Fixes #1681

For providers such as Azure Classic that have a discrepancy between "azure" and "azurerm", PULUMI_CONVERT=1 conversion no longer attempts to resolve and download the "azurerm" plugin from GitHub.

@t0yv0 t0yv0 requested a review from a team February 9, 2024 22:13
Copy link
Contributor

@guineveresaenger guineveresaenger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to see if we could just call LoadPackage with the correct name but that looks to be not in scope of this repo. Oof.
I presume that the ProviderInfo.Name field has to remain azurerm for pulumi-azure and that renaming that field instead would cause other issues?

Looks good to me, modulo thoughts and one minor nit.

if g.pluginHost != nil {
l := newLoader(g.pluginHost)
// Ensure azurerm resolves to azure for example:
l.aliasPackage(g.info.Name, string(g.pkg))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: g.pkg has a String() method

@t0yv0
Copy link
Member Author

t0yv0 commented Feb 9, 2024

LoadPackage is deep in the stack trace.. A good alternative behavior would be to fail fast when 'unknown_resource' is found in the example that doesn't belong to the known provider. But for now this works.

@t0yv0 t0yv0 merged commit 7eef4a3 into master Feb 9, 2024
7 checks passed
@t0yv0 t0yv0 deleted the t0yv0/fix-azure-loader-issues branch February 9, 2024 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub rate limit exceeded during tfgen
2 participants