-
Notifications
You must be signed in to change notification settings - Fork 172
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
Failed to read schema for any Azure resource #501
Comments
Hey @Ghostw4lk are you able to export other resources, or is it not working for any resource? There's ways to configure what credentials you use in aztfexport, does the same error occur if you run with the flag |
@Ghostw4lk The issue may cause by |
Hi all,
I want to export a specific Azure resource (PostgreSQL Flexible Server) to Terraform.
The environment details are the following:
To export the resource, I executed the following command:
[xxxxx@terraform-vm terraform-export]$ aztfexport query -n "resourceGroup =~ 'MY_RESOURCE_GROUP' and type contains 'Microsoft.DB'"
Error: Failed to import /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/MY_RESOURCE_GROUP/providers/Microsoft.DBforPostgreSQL/flexibleServers/test-db as azurerm_postgresql_flexible_server.res-0: exit status 1
Error: failed to read schema for azurerm_postgresql_flexible_server.res-0 in registry.terraform.io/hashicorp/azurerm: failed to instantiate provider "registry.terraform.io/hashicorp/azurerm" to obtain schema: fork/exec .terraform/providers/registry.terraform.io/hashicorp/azurerm/3.77.0/linux_amd64/terraform-provider-azurerm_v3.77.0_x5: permission denied
My user has the permission to read the resource group. I am able to get the whole list of 2637 items in that resource group through the following command: aztfexport resource-group MY_RESOURCE_GROUP
If I import a Azure resource through the command "terraform import", it works for me.
What could be the issue, that I can not export any Azure resource to Terraform?
The text was updated successfully, but these errors were encountered: