0

Some points to clarify: Using Windows 10 lastest version,

enter image description here

Using terraform in this version via WSL: enter image description here With the Ubuntu 22.04.5: enter image description here

I'm trying to do a terraform init and it happens this error:

enter image description here

Using direnv allow to export mysecrets, enter image description here

My main.tf: enter image description here enter image description here

My variables.tf enter image description here

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: enter image description here

My tenant ID: enter image description here My subscription: enter image description here My Application (client) ID: enter image description here enter image description here

Equivalent resources in AWS: enter image description here

Did to checkout out: enter image description here

Did a echo in bash to see if enviroment variables have content: enter image description here

Already change the secret for the service principal: enter image description here

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: enter image description here

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:

enter image description here

some info for who use more AWS: https://tutorialsdojo.com/aws-vs-azure-services-comparison/

My repo: https://github.com/mbastida43/azure_terraform_rg

enter image description here

Marlon
  • 408

0 Answers0