Closed teddimitrov closed 1 year ago
Hello,
I also had this problem, and the solution in this issue worked for me: https://github.com/boltops-tools/terraspace/issues/220#issuecomment-1059087698
I.e. I ran the following command in azure cli:
az provider register --namespace Microsoft.Storage
With the help of "export ARMREST_LOG_LEVEL=debug" (from the post about similar issue #220 ) I can glean additional information and it seems related to authorization. I'll revisit the documentation and videos on the site to see if I can get past that error:
D, [2023-03-30T14:59:05.430528 #19537] DEBUG -- : resp #
After exporting again the azure environment variables (ARM_SUBSCRIPTION_ID and the rest) I was able to successfully run terraspace! Nothing wrong with terraspace itself but a newbie user error :)
PS. After I resolved the initial error I ran into a second roadblock but thanks to the output from "export ARMREST_LOG_LEVEL=debug" I was able to determine that it was due to a policy I had applied to the subscription - "Public network access should be disabled for PaaS services".
Checklist
My Environment
After executing terraspace up demo -y for the terraform code to be deployed in the azure subscription
Building .terraspace-cache/eastus/dev/stacks/demo Current directory: .terraspace-cache/eastus/dev/stacks/demo Creating Resource Group dev-eastus... Exception Armrest::Error: #
download and install terraspace on debian run terraspace new project infra --plugin azurerm --examples followed by terraspace up demo -y
According to bundle exec ruby azure_check.rb:
Successfully connected to Azure with your ARM_CLIENT_ID and ARM_CLIENT_SECRET
terraspace setup check:
Detected Terraspace version: 2.2.3 Detected Terraform bin: /usr/bin/terraform Detected Terraform v1.4.2 Terraspace requires Terraform v0.12.x and above You're all set!
Code Sample
Solution Suggestion