Azure / alz-terraform-accelerator

Azure Landing Zones Terraform Accelerator
MIT License
99 stars 34 forks source link

bug: Continuous Deployment pipeline failed "unsupported argument" due to Telemetry #140

Closed alenat10 closed 5 months ago

alenat10 commented 5 months ago

Is there an existing issue for this?

Bootstrap or Starter Module Deployment? (Required)

starter_module

ALZ-PowerShell-Module Version (Required)

2.0.3

alz-terraform-accelerator Version (Required)

2.0.3

Starter Module (Required)

complete

Input arguments of the ALZ-PowerShell-Module (Required)

bootstrap-cache.json
{
  "allow_storage_access_from_my_ip": "false",
  "apply_approvers": "***",
  "azure_devops_agents_personal_access_token": "***",
  "azure_devops_authentication_scheme": "WorkloadIdentityFederation",
  "azure_devops_create_project": "true",
  "azure_devops_organization_name": "***",
  "azure_devops_personal_access_token": "***",
  "azure_devops_project_name": "***-alz",
  "azure_devops_use_organisation_legacy_url": "false",
  "bootstrap_location": "westus2",
  "bootstrap_subscription_id": "***",
  "environment_name": "mgmt",
  "postfix_number": "1",
  "service_name": "***",
  "use_private_networking": "false",
  "use_self_hosted_agents": "false",
  "use_separate_repository_for_pipeline_templates": "false"
}
starter-cache.json
{
  "configuration_file_path": "C:\\***\\***\\***\\Clients\\***\\config-hub-spoke.yaml",
  "default_location": "westus",
  "default_postfix": "",
  "root_parent_management_group_id": "***",
  "subscription_id_connectivity": "***",
  "subscription_id_identity": "***",
  "subscription_id_management": "***"
}

Contents of the configuration file used for the complete starter module. (Optional)

No response

Debug Output/Panic Output (Optional)

/usr/bin/az account set --subscription ***
/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command . '/home/vsts/work/_temp/azureclitaskscript1717007317847.ps1'
Running: terraform plan -out=tfplan -input=false
╷
│ Error: Unsupported argument
│ 
│   on main.tf line 132, in module "vwan":
│  132:   telemetry_resource_group_name         = try(local.module_vwan.telemetry_resource_group_name, null)
│ 
│ An argument named "telemetry_resource_group_name" is not expected here

##[error]Script failed with exit code: 1

Expected Behaviour (Required)

Tfplan is created

Actual Behaviour (Required)

[error]Script failed with exit code: 1

Steps to Reproduce (Optional)

Start "02 Azure Landing Zone Continuous Delivery" pipeline; monitor logs.

Important Factoids (Optional)

No response

References (Optional)

No response

alenat10 commented 5 months ago

it looks like telemetry_resource_group_name parameter (line #132 in main.tf, module vwan) is not a valid entry for AVM vwan module (https://registry.terraform.io/modules/Azure/avm-ptn-virtualwan/azurerm/latest). I removed the line 132 setting up the telemetry_resource_group_name parameter for vwan module from the main.tf and after that terraform plan finished as expected. But what if somebody actually needs the telemetry?

jaredfholgate commented 5 months ago

it looks like telemetry_resource_group_name parameter (line #132 in main.tf, module vwan) is not a valid entry for AVM vwan module (https://registry.terraform.io/modules/Azure/avm-ptn-virtualwan/azurerm/latest). I removed the line 132 setting up the telemetry_resource_group_name parameter for vwan module from the main.tf and after that terraform plan finished as expected. But what if somebody actually needs the telemetry?

If telemetry is configured, it will be deployed to the vwan resource group. We are working on an alternative provider based telemetry method for AVM, so hopefully will be replaced altogether soon.