Just wondering if can someone able to assist to share some insights and lead me where to troubleshoot and fix the error below I just came across when I ran my Terraform Apply. I have TF code where the variable is set to default: “00000000-0000-0000-0000-000000000000”. The intention is, If specified, identifies the landing zone resource deployment and correct placement in the Management Group hierarchy in our Azure environment.
Scripts for variable:
variable “subscription_id_landingzones” {
type = string
description = “If specified, identifies the landing zone resource deployment and correct placement in the Management Group hierarchy.”
default = “00000000-0000-0000-0000-000000000000”
validation {
condition = can(regex("^[a-z0-9-]{36}$", var.subscription_id_landingzones)) || var.subscription_id_landingzones == ""
error_message = "Value must be a valid Subscription ID (GUID)."
}
}
locals {
subscription_id_landingzones = var.subscription_id_landingzones
}
provider "azurerm" {
skip_provider_registration = "true"
subscription_id = local.subscription_id_landingzones
features {}
alias = "landingzones"
}
Error Messages:
Error: populating Resource Provider cache: listing Resource Providers: loading results: unexpected status 404 (404 Not Found) with error: SubscriptionNotFound: The subscription ‘00000000-0000-0000-0000-000000000000’ could not be found.
troubleshoot RBAC permissions, secrets expiry and terraform files