Azure / ALZ-Bicep

This repository contains the Azure Landing Zones (ALZ) Bicep modules that help deliver and deploy the Azure Landing Zone conceptual architecture in a modular approach. https://aka.ms/alz/docs
MIT License
762 stars 514 forks source link

Bicep Accelerator Error When Deploying Hub & Spoke with DDoS Set to False #694

Closed jamiepla1 closed 11 months ago

jamiepla1 commented 11 months ago

What happened? Provide a clear and concise description of the bug, including deployment details.

I am using the Bicep Accelerator with the following parameter file: \config\custom-parameters\hubNetworking.parameters.all.json

I have set the DDoS parameter to false

"parDdosEnabled": { "value": false

I am using the following yaml file:

\azuredevops\pipelines\alz-bicep-4a-hubspoke.yml

The error is:

New-AzResourceGroupDeployment: /home/vsts/work/1/s/pipeline-scripts/Deploy-ALZHub-HubAndSpoke.ps1:30 Line | 30 | New-AzResourceGroupDeployment @inputObject | ~~~~~~~~~~ | 12:19:43 - The deployment 'alz-Hub-and-SpokeDeploy-20231201T1212078328Z' | failed with error(s). Showing 1 out of 1 error(s). Status Message: | Resource | /subscriptions/MYCONSUBID/resourceGroups/rg-alz-connectivity/providers/Microsoft.Network/ddosProtectionPlans/alz-ddos-plan referenced by resource /subscriptions/MYCONSUBID/resourceGroups/rg-alz-connectivity/providers/Microsoft.Network/virtualNetworks/alz-hub-uksouth was not found. Please make sure that the referenced resource exists. (Code: InvalidGlobalResourceReference) CorrelationId: 83eb5209-3930-4640-8280-3fd92d9ab7dd

[error]PowerShell exited with code '1'.

Please provide the correlation id associated with your error or bug.

83eb5209-3930-4640-8280-3fd92d9ab7dd

What was the expected outcome?

Hub and Spoke network to deploy

Relevant log output

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "parLocation": {
      "value": "uksouth"
    },
    "parCompanyPrefix": {
      "value": "alz"
    },
    "parHubNetworkName": {
      "value": "alz-hub-uksouth"
    },
    "parHubNetworkAddressPrefix": {
      "value": "10.20.0.0/16"
    },
    "parSubnets": {
      "value": [
        {
          "name": "AzureBastionSubnet",
          "ipAddressRange": "10.20.0.0/24",
          "networkSecurityGroupId": "",
          "routeTableId": ""
        },
        {
          "name": "GatewaySubnet",
          "ipAddressRange": "10.20.254.0/24",
          "networkSecurityGroupId": "",
          "routeTableId": ""
        },
        {
          "name": "AzureFirewallSubnet",
          "ipAddressRange": "10.20.255.0/24",
          "networkSecurityGroupId": "",
          "routeTableId": ""
        },
        {
          "name": "AzureFirewallManagementSubnet",
          "ipAddressRange": "10.20.253.0/24",
          "networkSecurityGroupId": "",
          "routeTableId": ""
        }
      ]
    },
    "parDnsServerIps": {
      "value": []
    },
    "parPublicIpSku": {
      "value": "Standard"
    },
    "parPublicIpPrefix": {
      "value": ""
    },
    "parPublicIpSuffix": {
      "value": "-PublicIP"
    },
    "parAzBastionEnabled": {
      "value": false
    },
    "parAzBastionName": {
      "value": "alz-bastion"
    },
    "parAzBastionSku": {
      "value": "Standard"
    },
    "parAzBastionTunneling": {
      "value": false
    },
    "parAzBastionNsgName": {
      "value": "nsg-AzureBastionSubnet"
    },
    "parDdosEnabled": {
      "value": false
    },
    "parDdosPlanName": {
      "value": "alz-ddos-plan"
    },
    "parAzFirewallEnabled": {
      "value": false
    },
    "parAzFirewallName": {
      "value": "alz-azfw-uksouth"
    },
    "parAzFirewallPoliciesName": {
      "value": "alz-azfwpolicy-uksouth"
    },
    "parAzFirewallTier": {
      "value": "Standard"
    },
    "parAzFirewallIntelMode": {
      "value": "Alert"
    },
    "parAzFirewallAvailabilityZones": {
      "value": []
    },
    "parAzErGatewayAvailabilityZones": {
      "value": []
    },
    "parAzVpnGatewayAvailabilityZones": {
      "value": []
    },
    "parAzFirewallDnsProxyEnabled": {
      "value": false
    },
    "parAzFirewallDnsServers": {
      "value": []
    },
    "parHubRouteTableName": {
      "value": "alz-hub-routetable"
    },
    "parDisableBgpRoutePropagation": {
      "value": false
    },
    "parPrivateDnsZonesEnabled": {
      "value": true
    },
    "parPrivateDnsZones": {
      "value": [
        "privatelink.uksouth.azmk8s.io",
        "privatelink.uksouth.batch.azure.com",
        "privatelink.uksouth.kusto.windows.net",
        "privatelink.uks.backup.windowsazure.com",
        "privatelink.adf.azure.com",
        "privatelink.afs.azure.net",
        "privatelink.agentsvc.azure-automation.net",
        "privatelink.analysis.windows.net",
        "privatelink.api.azureml.ms",
        "privatelink.azconfig.io",
        "privatelink.azure-api.net",
        "privatelink.azure-automation.net",
        "privatelink.azurecr.io",
        "privatelink.azure-devices.net",
        "privatelink.azure-devices-provisioning.net",
        "privatelink.azuredatabricks.net",
        "privatelink.azurehdinsight.net",
        "privatelink.azurehealthcareapis.com",
        "privatelink.azurestaticapps.net",
        "privatelink.azuresynapse.net",
        "privatelink.azurewebsites.net",
        "privatelink.batch.azure.com",
        "privatelink.blob.core.windows.net",
        "privatelink.cassandra.cosmos.azure.com",
        "privatelink.cognitiveservices.azure.com",
        "privatelink.database.windows.net",
        "privatelink.datafactory.azure.net",
        "privatelink.dev.azuresynapse.net",
        "privatelink.dfs.core.windows.net",
        "privatelink.dicom.azurehealthcareapis.com",
        "privatelink.digitaltwins.azure.net",
        "privatelink.directline.botframework.com",
        "privatelink.documents.azure.com",
        "privatelink.eventgrid.azure.net",
        "privatelink.file.core.windows.net",
        "privatelink.gremlin.cosmos.azure.com",
        "privatelink.guestconfiguration.azure.com",
        "privatelink.his.arc.azure.com",
        "privatelink.kubernetesconfiguration.azure.com",
        "privatelink.managedhsm.azure.net",
        "privatelink.mariadb.database.azure.com",
        "privatelink.media.azure.net",
        "privatelink.mongo.cosmos.azure.com",
        "privatelink.monitor.azure.com",
        "privatelink.mysql.database.azure.com",
        "privatelink.notebooks.azure.net",
        "privatelink.ods.opinsights.azure.com",
        "privatelink.oms.opinsights.azure.com",
        "privatelink.pbidedicated.windows.net",
        "privatelink.postgres.database.azure.com",
        "privatelink.prod.migration.windowsazure.com",
        "privatelink.purview.azure.com",
        "privatelink.purviewstudio.azure.com",
        "privatelink.queue.core.windows.net",
        "privatelink.redis.cache.windows.net",
        "privatelink.redisenterprise.cache.azure.net",
        "privatelink.search.windows.net",
        "privatelink.service.signalr.net",
        "privatelink.servicebus.windows.net",
        "privatelink.siterecovery.windowsazure.com",
        "privatelink.sql.azuresynapse.net",
        "privatelink.table.core.windows.net",
        "privatelink.table.cosmos.azure.com",
        "privatelink.tip1.powerquery.microsoft.com",
        "privatelink.token.botframework.com",
        "privatelink.vaultcore.azure.net",
        "privatelink.web.core.windows.net",
        "privatelink.webpubsub.azure.com"
      ]
    },
    "parPrivateDnsZoneAutoMergeAzureBackupZone": {
      "value": true
    },
    "parVpnGatewayConfig": {
      "value": {}
    },
    "parExpressRouteGatewayConfig": {
      "value": {}
    },
    "parTags": {
      "value": {
        "Environment": "production"
      }
    },
    "parTelemetryOptOut": {
      "value": false
    },
    "parBastionOutboundSshRdpPorts": {
      "value": [
        "22",
        "3389"
      ]
    }
  }
}

Check previous GitHub issues

Code of Conduct

stalejohnsen commented 11 months ago

Hi again @jamiepla1. This issue you have run into is documented in another open issue, with proposed fix and workaround. Please check the comments in this one: https://github.com/Azure/ALZ-Bicep/issues/596

oZakari commented 11 months ago

Closing as exact duplicate of #596.