Some points to clarify: Using Windows 10 lastest version,
Using terraform in this version via WSL:
With the Ubuntu 22.04.5:

I'm trying to do a terraform init and it happens this error:
Using direnv allow to export mysecrets,

Tried to add a new secret for the service principal and no results:
Azure portal with the name of resource group, storage account and virtual network and
availabilityset1, availabilityset2 and availabilityset3:

My tenant ID:
My subscription:
My Application (client) ID:

Did a echo in bash to see if enviroment variables have content:

Already change the secret for the service principal:

What should I try ? My repository: https://github.com/mbastida43/azure_terraform_rg
Tried terraform init --reconfigure
And get a lot of time with an error message:

marlon@DESKTOP-VF5D0E6:~/aula/resourcegroup$ terraform init --reconfigure
Initializing the backend...
╷
│ Error: Failed to get existing workspaces: Error retrieving keys for Storage Account "storageaccountmarlon": autorest/Client#Do: Preparing request failed: StatusCode=0 -- Original Error: clientCredentialsToken: received HTTP status 401 with response: {"error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app '0000000-50f7-44a4-95b6-cce8b4400000'. Trace ID: 00000000-120d-4725-adb4-8f4e222000000 Correlation ID: 00000000-6764-4229-9ea6-3213f0000000 Timestamp: 2025-02-11 11:49:20Z","error_codes":[7000215],"timestamp":"2025-02-11 11:49:20Z","trace_id":"5eefa5e5-120d-4725-adb4-8f4e22282000","correlation_id":"00c5ac36-6764-4229-9ea6-3213fc15a62a","error_uri":"https://login.microsoftonline.com/error?code=7000215"}
Did until a ntpdate to see if have some problem with time and no problems:
some info for who use more AWS: https://tutorialsdojo.com/aws-vs-azure-services-comparison/








