Closed jmlp1 closed 1 month ago
Looks az login needs to be launched, different error trying to find the best way
/home/vsts/work/_temp/8946c851-f033-4569-bbec-dc57b4625237.sh: line 5: ARM_CLIENT_ID: command not found /home/vsts/work/_temp/8946c851-f033-4569-bbec-dc57b4625237.sh: line 5: ARM_CLIENT_SECRET: command not found /home/vsts/work/_temp/8946c851-f033-4569-bbec-dc57b4625237.sh: line 5: ARM_TENANT_ID: command not found ERROR: Failed to resolve tenant ''.
Error detail: {"error":"invalid_tenant","error_description":"AADSTS90002: Tenant 'v2.0' not found. Check to make sure you have the correct tenant ID and are signing into the correct cloud. Check with your subscription administrator, this may happen if there are no active subscriptions for the tenant. Trace ID: 93e00772-7c95-44eb-b23f-69122bca0a00 Correlation ID: a117747b-495c-4a2c-8c2e-5f749e08bcd6 Timestamp: 2024-07-15 01:36:58Z","error_codes":[90002],"timestamp":"2024-07-15 01:36:58Z","trace_id":"93e00772-7c95-44eb-b23f-69122bca0a00","correlation_id":"a117747b-495c-4a2c-8c2e-5f749e08bcd6","error_uri":"https://login.microsoftonline.com/error?code=90002"} Initializing the backend...
Fixed
task: TerraformTaskV4@4 displayName: "Terraform Init" inputs: command: 'init' workingDirectory: '$(System.DefaultWorkingDirectory)' backendType: 'azurerm' backendServiceArm: '$(TF_VAR_azureSubscription)' backendAzureRmResourceGroupName: '$(TF_VAR_azurerm_resource_group)' backendAzureRmStorageAccountName: '$(TF_VAR_azurerm_stgaccount)' backendAzureRmContainerName: '$(TF_VAR_azurerm_containername)' backendAzureRmKey: 'terraform.tfstate'
When launched the ADO Pipeline the error from below occurs
Error: Failed to get existing workspaces: Error retrieving keys for Storage Account "var.azurerm_stgaccount": autorest/Client#Do: Preparing request failed: StatusCode=0 -- Original Error: clientCredentialsToken: received HTTP status 400 with response: {"error":"invalid_request","error_description":"AADSTS900023: Specified tenant identifier '$(arm_tenant_id)' is neither a valid DNS name, nor a valid external domain. Trace ID: 14970a79-a4c5-482c-b8da-7267e7871900 Correlation ID: d8f6648f-ba26-416c-b67c-37718452f9ba Timestamp: 2024-07-14 23:00:10Z","error_codes":[900023],"timestamp":"2024-07-14 23:00:10Z","trace_id":"14970a79-a4c5-482c-b8da-7267e7871900","correlation_id":"d8f6648f-ba26-416c-b67c-37718452f9ba","error_uri":"https://login.microsoftonline.com/error?code=900023"}