terraformer: An Azure Environment with name "" was not found: autorest/azure: There is no cloud environment matching the name "AZURECLOUD"
Hi Team,
I am trying to import resources from azure I am getting this error. can you please help with this?
➜ terraformer version
Terraformer v0.8.18
➜ terraformer plan azure --output hcl --resource-group JumpServer -r "*" --verbose
2021/11/13 22:03:59 Testing if Service Principal / Client Certificate is applicable for Authentication..
2021/11/13 22:03:59 Testing if Multi Tenant Service Principal / Client Secret is applicable for Authentication..
2021/11/13 22:03:59 Testing if Service Principal / Client Secret is applicable for Authentication..
2021/11/13 22:03:59 Testing if Managed Service Identity is applicable for Authentication..
2021/11/13 22:03:59 Testing if Obtaining a token from the Azure CLI is applicable for Authentication..
2021/11/13 22:03:59 Using Obtaining a token from the Azure CLI for Authentication
2021/11/13 22:03:59 An Azure Environment with name "" was not found: autorest/azure: There is no cloud environment matching the name "AZURECLOUD"
Please guide me, how to fix this.
Thanks -Dhanasekaran.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 20 (1 by maintainers)
Commits related to this issue
- azurerm: add MSI and OpenID autentication fixes #1149 — committed to juarezr/terraformer by juarezr 2 years ago
This looks like the same error described in https://github.com/GoogleCloudPlatform/terraformer/issues/654
I revisited again and went down the route of the client id and secret and looks to be working. Many thanks
Are you using the Windows version 2.28 of the azure cli? That’s what I needed to do
This problem is the result of changes to the Azure-cli code, that really needs to be fixed. I found the only way to use an az login session, was to download and use, the Windows msi installer for version 2.28.0 from this link https://github.com/Azure/azure-cli/releases/download/azure-cli-2.28.0/azure-cli-2.28.0.msi as per my previous post above from 12th Jan 2022.