Azure Remote State - Error Retrieving Keys

Good afternoon. I’m hoping someone can help me understand why this is happening. Spinning up a new stack in a new region. ts init creates the resource group, the storage account, and the container, but will not create the blob for the state file. In addition, an existing state file is unable to be downloaded for an existing stack. This was working until recently. Thanks in advance.

Changing Azure region to westus.
Execute terraspace to deploy stack - fortigateTransitCommon in Azure region - westus.
Building .terraspace-cache/westus/dev/stacks/fortigateTransitCommon
Creating Resource Group rg-terraform-resources-westus...
Creating Storage Account sa4c16westus...
Creating Storage Container terraform-state...
Downloading tfstate files for dependencies defined in tfvars...

Error loading the state: Error retrieving keys for Storage Account "sa4c16westus": storage.AccountsClient#ListKeys: Failure sending request: StatusCode=0 -- Original Error: Post "": dial tcp: lookup on cannot unmarshal DNS message

Please ensure that your Terraform state exists and that you've
configured it properly. You can use the "-state" flag to point
Terraform at another state file.
Error running: cd /opt/terraspaceProjects/azureSecureTransit/.terraspace-cache/westus/dev/stacks/paloAltoTransitEgressIngress && terraform state pull > /tmp/terraspace/remote_state/stacks/paloAltoTransitEgressIngress/state.json

Wondering if pulling the state works when you run it manually. IE:

cd .terraspace-cache/westus/dev/stacks/paloAltoTransitEgressIngress
terraform state pull

Also, what versions are you using:

  • terraspace
  • terraspace_plugin_azurerm

Check that they’re all up to date.

Also, curious to see what’s different about the

cat .terraspace-cache/westus/dev/stacks/paloAltoTransitEgressIngress/

And also the other one. It’s fine to redact the info. Maybe check the differences though.

It looks to be an issue with the windows WSL. MS broke something again. can it be? lol. For anyone else having the same problem, see this - Thanks again.

1 Like