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

How to use azapi to create Azure storage account with PE and network acl && containers #637

Closed
RyanChen22 opened this issue Oct 14, 2024 · 4 comments

Comments

@RyanChen22
Copy link

As we noticed there might be a bug in using AzureRM module to create both storage accounts with PE and network acl && containers in GH hashicorp/terraform-provider-azurerm#27607, my customers need further assistance to achieve the same scenario by using azapi. As of now, it keeps prompting the following exceptions:
Error: Failed to query available provider packages

│ Could not retrieve the list of available versions for provider hashicorp/azapi: provider registry
registry.terraform.io
does not have
│ a provider named
registry.terraform.io/hashicorp/azapi

│ Did you intend to use azure/azapi? If so, you must specify that source address in each module which requires that provider. To see
│ which modules are currently depending on hashicorp/azapi, run the following command:
│ terraform providers

It will be appreciated if you could help to mitigate the issue above.

@ms-henglu
Copy link
Member

Hi @RyanChen22 ,

Thank you for taking time to open the issue.

Please add the below config to your terraform configuration to specify the namespace of the azapi provider:

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
      version = "2.0.0-beta" // version
    }
  }
}

provider "azapi" {
  # Configuration options
}

@RyanChen22
Copy link
Author

@ms-henglu - The config has been used in the code but still caused the issue. Its just my customer is using v1.15.0. Is there any issue with 1.15.0? Cos 2.0.0 is currently in beta which is not allowed to be used in my customer environment.

@ms-henglu
Copy link
Member

@RyanChen22 - v1.15.0 is fine. Please add the config to the workspace which uses the azapi provider too.

@ms-henglu
Copy link
Member

I'll close this issue as it's resolved, but feel free to reopen it if there's any questions.

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

No branches or pull requests

2 participants