[x] Upgrade Terraspace: Are you using the latest version of Terraspace? This allows Terraspace to fix issues fast. There's an Upgrading Guide: https://terraspace.cloud/docs/misc/upgrading/
[x] Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.boltops.com
[x] Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
My Environment
I've created new storage account for the backend in another subscription, manually moved terraform state, but now terraspace can't access the storage account in another subscription.
Software
Version
Operating System
WSL ubuntu 22.04 x64
Terraform
1.4.0
Terraspace
2.2.15
Ruby
3.3.0
Expected Behaviour
Terraspace works with resources in one subscription, specified in ARM_SUBSCRIPTION_ID variable, and successfully stores the terraform state in the storage account of another subscription without errors.
Current Behavior
Terraspace doesn't care about subscription_id in backend config,
TS tries to find resource group in the wrong subscription and of cause can't find.
Then TS creates new resource group in the wrong subscription.
Then TS tries to create storage account(which already exists in another subscription).
Then TS tries to create container in the storage account and fails with 404 Not Found error:
Checklist
My Environment
I've created new storage account for the backend in another subscription, manually moved terraform state, but now terraspace can't access the storage account in another subscription.
Expected Behaviour
Terraspace works with resources in one subscription, specified in
ARM_SUBSCRIPTION_ID
variable, and successfully stores the terraform state in the storage account of another subscription without errors.Current Behavior
Terraspace doesn't care about
subscription_id
in backend config,TS tries to find resource group in the wrong subscription and of cause can't find. Then TS creates new resource group in the wrong subscription. Then TS tries to create storage account(which already exists in another subscription). Then TS tries to create container in the storage account and fails with 404 Not Found error:
logs
Creating Storage Blob Container terraform-state... Exception Armrest::Error: #Step-by-step reproduction instructions
terraspace plan
Code Sample
Solution Suggestion
Configure azurerm backend plugin to be able to access storage account in another subscription