hello,
this is my backend where statefile to be placed in different subscription
terraform {
required_version = “>= 1.2.8”
backend “azurerm” {
resource_group_name = “NF-IAC-Prod-RG”
storage_account_name = “nfmgntproddatam5m***”
container_name = “nf-mgnt-prod”
key = “terraform.tfstate”
subscription_id = “b914cc57-d671-498a-90d0-6179710db***”
}
}
am getting below error while performing terraform init with sequence of commands
az account clear
az login --allow-no-subscriptions --tenant “”
az account set --subscription ‘’
terraform init
Failed to get existing workspaces: Error retrieving keys for Storage Account “nfmgntproddatam5***”: storage.AccountsClient#ListKeys: Failure responding to request: StatusCode=404 – Original Error: autorest/azure: Service returned an error. Status=404 Code=“ResourceNotFound” Message="The Resource ‘Microsoft.Storage/storageAccounts/nfmgntproddatam5m***’ under resource group ‘NF-IAC-Prod-RG’ was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"