Loading...
Loading...
### Terraform Version ```shell Terraform v1.8.5 on darwin_arm64 + provider registry.terraform.io/hashicorp/azurerm v3.107.0 ``` ### Terraform Configuration Files ```terraform **In main.tf:** module "app-service-windows" { source = "../../modules/app-service" resource_group_name = resource.azurerm_resource_group.connect-application.name location = local.location environment = var.environment naming_prefix = "${local.location_abbreviations[local.location]}-${var.environment}" stack_name = local.stack_name app_settings = var.app_settings site_config = var.site_config default_site_config = local.default_site_config virtual_network_subnet_id = module.connect-vnet.app_services_subnet_id connection_strings = local.connection_strings app_service_logs_settings = var.app_service_logs_settings tags = local.tags os_type = var.os_type sku_name = var.sku_name app_names = local.app_names team_name = local.team_name pe_subnet_id = module.connect-vnet.private_endpoints_subnet_id key_vault_id = data.terraform_remote_state.data.outputs.data_keyvault.resource_id tenant_id = data.terraform_remote_state.data.outputs.data_keyvault.tenant_id workspace_id = data.terraform_remote_state.data.outputs.connect_log_analytics_workspace.id private_dns_zone_ids = [ module.connect-vnet.azurewebsites_privatelink_dns_zone_id, data.terraform_remote_state.techops.outputs.techops_azurewebsites_privatelink_dns_zone_id ] #what's the proper pDNS zone id? providers = { azurerm.techops = azurerm.techops } } In data stack: resource "azurerm_log_analytics_workspace" "connect-la" { location = local.location name = "${local.location_abbreviations[local.location]}-${var.environment}-${local.team_name}-connect-la-001" resource_group_name = azurerm_resource_group.data-rg.name } output "connect_log_analytics_workspace" { value = { id = azurerm_log_analytics_workspace.connect-la.id } } ``` ### Debug Output ╷ │ Error: Unsupported attribute │ │ on main.tf line 231, in module "app-service-windows": │ 231: workspace_id = data.terraform_remote_state.data.outputs.connect_log_analytics_workspace.id │ ├──────────────── │ │ data.terraform_remote_state.data.outputs is object with 6 attributes │ │ This object does not have an attribute named "connect_log_analytics_workspace". The output from 'data': data "terraform_remote_state" "data" { backend = "azurerm" config = { container_name = "data" key = "modified" resource_group_name = "modified" storage_account_name = "modified" subscription_id = "modified" } outputs = { connect_log_analytics_workspace = { id = "modified" } connect_servicebus = { connection_string_reference = "modified" resource_id = "modified" } connect_sql_server = { connection_string_reference = "modified" resource_id = "modified" } .... other ### Expected Behavior The resource previously provisioned with terraform apply with help of reference to outputs of remote 'data' state should get destroyed as well. ### Actual Behavior On destroy, Terraform does not see the attribute in outputs of terraform_remote_state.data while it's clearly there (confirmed with `terraform output` in data stack and provided above). I've checked the state file itself and I can clearly see an attribute there ### Steps to Reproduce terraform init -backend-config="key=modified.tfstate" terraform apply -var environment=preprod terraform desotry ### Additional Context _No response_ ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.