Azure / terraform-azurerm-caf-enterprise-scale

Azure landing zones Terraform module
https://aka.ms/alz/tf
MIT License
853 stars 560 forks source link

Bug Report #1164

Open kevinevans1 opened 21 hours ago

kevinevans1 commented 21 hours ago

Community Note

Versions

terraform: 1.9.7

azure provider: ~> 3.107

module:6.0

Description

Describe the bug

When trying to deploy version 6 of the module using terraform cloud as the back, we receive these errors around data collection rules via the azapi.

Steps to Reproduce

  1. Terraform Init
  2. Terraform Apply
  3. Verbose error messages from terraform raw logs.

Screenshots

Error: Failed to retrieve resource with module.enterprise_scale.azapi_resource.data_collection_rule["/subscriptions/sub/resourceGroups/c2c-mgmt/providers/Microsoft.Insights/dataCollectionRules/c2c-dcr-defendersql-prod"] on .terraform/modules/enterprise_scale/resources.management.tf line 158, in resource "azapi_resource" "data_collection_rule": resource "azapi_resource" "data_collection_rule" { checking for presence of existing Resource: (ResourceId "/subscriptions/sub/resourceGroups/c2c-mgmt/providers/Microsoft.Insights/dataCollectionRules/c2c-dcr-defendersql-prod" / Api Version "2021-04-01"): ChainedTokenCredential: failed to acquire a token. Attempted credentials: managed identity timed out AzureCLICredential: Azure CLI not found on path

Error: Failed to retrieve resource with module.enterprise_scale.azapi_resource.data_collection_rule["/subscriptions/sub/resourceGroups/c2c-mgmt/providers/Microsoft.Insights/dataCollectionRules/c2c-dcr-vm-insights"] on .terraform/modules/enterprise_scale/resources.management.tf line 158, in resource "azapi_resource" "data_collection_rule": resource "azapi_resource" "data_collection_rule" { checking for presence of existing Resource: (ResourceId "/subscriptions/sub/resourceGroups/c2c-mgmt/providers/Microsoft.Insights/dataCollectionRules/c2c-dcr-vm-insights" / Api Version "2021-04-01"): ChainedTokenCredential: failed to acquire a token. Attempted credentials: managed identity timed out AzureCLICredential: Azure CLI not found on path

Additional context

not at this time.

matt-FFFFFF commented 4 hours ago

Hi,

This is not a module bug, it's due to the AzAPI provider not being able to authenticate. #RR