{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "metadata": { "_generator": { "name": "bicep", "version": "0.25.53.49325", "templateHash": "17730834784771714323" } }, "parameters": { "location": { "type": "string", "defaultValue": "[resourceGroup().location]", "metadata": { "description": "Region where the Mobile Network will be deployed (must match the resource group region)" } }, "mobileNetworkName": { "type": "string", "metadata": { "description": "The name for the private mobile network" } }, "mobileCountryCode": { "type": "string", "defaultValue": "001", "metadata": { "description": "The mobile country code for the private mobile network" } }, "mobileNetworkCode": { "type": "string", "defaultValue": "01", "metadata": { "description": "The mobile network code for the private mobile network" } }, "siteName": { "type": "string", "defaultValue": "myExampleSite", "metadata": { "description": "The name for the site" } }, "serviceName": { "type": "string", "defaultValue": "Allow-all-traffic", "metadata": { "description": "The name of the service" } }, "simPolicyName": { "type": "string", "defaultValue": "Default-policy", "metadata": { "description": "The name of the SIM policy" } }, "sliceName": { "type": "string", "defaultValue": "slice-1", "metadata": { "description": "The name of the slice" } }, "simGroupName": { "type": "string", "defaultValue": "", "metadata": { "description": "The name for the SIM group." } }, "existingEncryptionKeyUrl": { "type": "string", "defaultValue": "", "metadata": { "description": "A unversioned key vault key to encrypt the SIM data that belongs to this SIM group. For example: https://contosovault.vault.azure.net/keys/azureKey." } }, "existingUserAssignedIdentityResourceId": { "type": "string", "defaultValue": "", "metadata": { "description": "User-assigned identity is an identity in Azure Active Directory that can be used to give access to other Azure resource such as Azure Key Vault. This identity should have Get, Wrap key, and Unwrap key permissions on the key vault." } }, "simResources": { "type": "array", "defaultValue": [], "metadata": { "description": "An array containing properties of the SIM(s) you wish to create. See [Provision proxy SIM(s)](https://docs.microsoft.com/en-gb/azure/private-5g-core/provision-sims-azure-portal) for a full description of the required properties and their format." } }, "azureStackEdgeDevice": { "type": "string", "defaultValue": "", "metadata": { "description": "The resource ID of the Azure Stack Edge device to deploy to" } }, "controlPlaneAccessInterfaceName": { "type": "string", "defaultValue": "", "metadata": { "description": "The virtual network name on port 5 on your Azure Stack Edge Pro device corresponding to the control plane interface on the access network. For 5G, this interface is the N2 interface; for 4G, it's the S1-MME interface." } }, "controlPlaneAccessIpAddress": { "type": "string", "defaultValue": "", "metadata": { "description": "The IP address of the control plane interface on the access network. In 5G networks this is called the N2 interface whereas in 4G networks this is called the S1-MME interface." } }, "userPlaneAccessInterfaceName": { "type": "string", "defaultValue": "", "metadata": { "description": "The virtual network name on port 5 on your Azure Stack Edge Pro device corresponding to the user plane interface on the access network. For 5G, this interface is the N3 interface; for 4G, it's the S1-U interface." } }, "userPlaneDataInterfaceName": { "type": "string", "defaultValue": "", "metadata": { "description": "The virtual network name on port 6 on your Azure Stack Edge Pro device corresponding to the user plane interface on the data network. For 5G, this interface is the N6 interface; for 4G, it's the SGi interface." } }, "userEquipmentAddressPoolPrefix": { "type": "string", "defaultValue": "", "metadata": { "description": "The network address of the subnet from which dynamic IP addresses must be allocated to UEs, given in CIDR notation. Optional if userEquipmentStaticAddressPoolPrefix is specified. If both are specified, they must be the same size and not overlap." } }, "userEquipmentStaticAddressPoolPrefix": { "type": "string", "defaultValue": "", "metadata": { "description": "The network address of the subnet from which static IP addresses must be allocated to UEs, given in CIDR notation. Optional if userEquipmentAddressPoolPrefix is specified. If both are specified, they must be the same size and not overlap." } }, "dataNetworkName": { "type": "string", "defaultValue": "internet", "metadata": { "description": "The name of the data network" } }, "desiredState": { "type": "string", "defaultValue": "Uninstalled", "metadata": { "description": "The desired installation state" } }, "ueMtu": { "type": "int", "defaultValue": 1440, "metadata": { "description": "The MTU (in bytes) signaled to the UE. The same MTU is set on the user plane data links for all data networks. The MTU set on the user plane access link is calculated to be 60 bytes greater than this value to allow for GTP encapsulation. " } }, "coreNetworkTechnology": { "type": "string", "defaultValue": "5GC", "allowedValues": [ "EPC", "5GC", "EPC + 5GC" ], "metadata": { "description": "The mode in which the packet core instance will run" } }, "naptEnabled": { "type": "string", "allowedValues": [ "Enabled", "Disabled" ], "metadata": { "description": "Whether or not Network Address and Port Translation (NAPT) should be enabled for this data network" } }, "dnsAddresses": { "type": "array", "metadata": { "description": "A list of DNS servers that UEs on this data network will use" } }, "customLocation": { "type": "string", "defaultValue": "", "metadata": { "description": "The resource ID of the customLocation representing the ASE device where the packet core will be deployed. If this parameter is not specified then the 5G core will be created but will not be deployed to an ASE. [Collect custom location information](https://docs.microsoft.com/en-gb/azure/private-5g-core/collect-required-information-for-a-site#collect-custom-location-information) explains which value to specify here." } } }, "resources": [ { "copy": { "name": "exampleSimResources", "count": "[length(parameters('simResources'))]" }, "condition": "[not(empty(parameters('simGroupName')))]", "type": "Microsoft.MobileNetwork/simGroups/sims", "apiVersion": "2024-02-01", "name": "[format('{0}/{1}', if(empty(parameters('simGroupName')), 'placeHolderForValidation', parameters('simGroupName')), parameters('simResources')[copyIndex()].simName)]", "properties": { "integratedCircuitCardIdentifier": "[parameters('simResources')[copyIndex()].integratedCircuitCardIdentifier]", "internationalMobileSubscriberIdentity": "[parameters('simResources')[copyIndex()].internationalMobileSubscriberIdentity]", "authenticationKey": "[parameters('simResources')[copyIndex()].authenticationKey]", "operatorKeyCode": "[parameters('simResources')[copyIndex()].operatorKeyCode]", "deviceType": "[parameters('simResources')[copyIndex()].deviceType]", "simPolicy": { "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/simPolicies', parameters('mobileNetworkName'), parameters('simPolicyName'))]" } }, "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/simGroups', if(empty(parameters('simGroupName')), 'placeHolderForValidation', parameters('simGroupName')))]", "[resourceId('Microsoft.MobileNetwork/mobileNetworks/simPolicies', parameters('mobileNetworkName'), parameters('simPolicyName'))]" ] }, { "type": "Microsoft.MobileNetwork/packetCoreControlPlanes/packetCoreDataPlanes/attachedDataNetworks", "apiVersion": "2024-02-01", "name": "[format('{0}/{1}/{2}', parameters('siteName'), parameters('siteName'), parameters('dataNetworkName'))]", "location": "[parameters('location')]", "properties": { "userPlaneDataInterface": { "name": "[parameters('userPlaneDataInterfaceName')]" }, "userEquipmentAddressPoolPrefix": "[if(empty(parameters('userEquipmentAddressPoolPrefix')), null(), createArray(parameters('userEquipmentAddressPoolPrefix')))]", "userEquipmentStaticAddressPoolPrefix": "[if(empty(parameters('userEquipmentStaticAddressPoolPrefix')), null(), createArray(parameters('userEquipmentStaticAddressPoolPrefix')))]", "naptConfiguration": { "enabled": "[parameters('naptEnabled')]" }, "dnsAddresses": "[parameters('dnsAddresses')]" }, "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/packetCoreControlPlanes/packetCoreDataPlanes', parameters('siteName'), parameters('siteName'))]" ] }, { "type": "Microsoft.MobileNetwork/packetCoreControlPlanes/packetCoreDataPlanes", "apiVersion": "2024-02-01", "name": "[format('{0}/{1}', parameters('siteName'), parameters('siteName'))]", "location": "[parameters('location')]", "properties": { "userPlaneAccessInterface": { "name": "[parameters('userPlaneAccessInterfaceName')]" } }, "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/packetCoreControlPlanes', parameters('siteName'))]" ] }, { "type": "Microsoft.MobileNetwork/mobileNetworks", "apiVersion": "2024-02-01", "name": "[parameters('mobileNetworkName')]", "location": "[parameters('location')]", "properties": { "publicLandMobileNetworkIdentifier": { "mcc": "[parameters('mobileCountryCode')]", "mnc": "[parameters('mobileNetworkCode')]" } } }, { "type": "Microsoft.MobileNetwork/mobileNetworks/sites", "apiVersion": "2024-02-01", "name": "[format('{0}/{1}', parameters('mobileNetworkName'), parameters('siteName'))]", "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/mobileNetworks', parameters('mobileNetworkName'))]" ] }, { "type": "Microsoft.MobileNetwork/mobileNetworks/dataNetworks", "apiVersion": "2024-02-01", "name": "[format('{0}/{1}', parameters('mobileNetworkName'), parameters('dataNetworkName'))]", "location": "[parameters('location')]", "properties": {}, "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/mobileNetworks', parameters('mobileNetworkName'))]" ] }, { "type": "Microsoft.MobileNetwork/mobileNetworks/slices", "apiVersion": "2024-02-01", "name": "[format('{0}/{1}', parameters('mobileNetworkName'), parameters('sliceName'))]", "location": "[parameters('location')]", "properties": { "snssai": { "sst": 1 } }, "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/mobileNetworks', parameters('mobileNetworkName'))]" ] }, { "type": "Microsoft.MobileNetwork/mobileNetworks/services", "apiVersion": "2024-02-01", "name": "[format('{0}/{1}', parameters('mobileNetworkName'), parameters('serviceName'))]", "location": "[parameters('location')]", "properties": { "servicePrecedence": 253, "pccRules": [ { "ruleName": "All-traffic", "rulePrecedence": 253, "trafficControl": "Enabled", "serviceDataFlowTemplates": [ { "templateName": "Any-traffic", "protocol": [ "ip" ], "direction": "Bidirectional", "remoteIpList": [ "any" ] } ] } ] }, "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/mobileNetworks', parameters('mobileNetworkName'))]" ] }, { "type": "Microsoft.MobileNetwork/mobileNetworks/simPolicies", "apiVersion": "2024-02-01", "name": "[format('{0}/{1}', parameters('mobileNetworkName'), parameters('simPolicyName'))]", "location": "[parameters('location')]", "properties": { "ueAmbr": { "uplink": "2 Gbps", "downlink": "2 Gbps" }, "defaultSlice": { "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/slices', parameters('mobileNetworkName'), parameters('sliceName'))]" }, "sliceConfigurations": [ { "slice": { "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/slices', parameters('mobileNetworkName'), parameters('sliceName'))]" }, "defaultDataNetwork": { "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/dataNetworks', parameters('mobileNetworkName'), parameters('dataNetworkName'))]" }, "dataNetworkConfigurations": [ { "dataNetwork": { "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/dataNetworks', parameters('mobileNetworkName'), parameters('dataNetworkName'))]" }, "sessionAmbr": { "uplink": "2 Gbps", "downlink": "2 Gbps" }, "allowedServices": [ { "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/services', parameters('mobileNetworkName'), parameters('serviceName'))]" } ] } ] } ] }, "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/mobileNetworks/dataNetworks', parameters('mobileNetworkName'), parameters('dataNetworkName'))]", "[resourceId('Microsoft.MobileNetwork/mobileNetworks', parameters('mobileNetworkName'))]", "[resourceId('Microsoft.MobileNetwork/mobileNetworks/services', parameters('mobileNetworkName'), parameters('serviceName'))]", "[resourceId('Microsoft.MobileNetwork/mobileNetworks/slices', parameters('mobileNetworkName'), parameters('sliceName'))]" ] }, { "condition": "[not(empty(parameters('simGroupName')))]", "type": "Microsoft.MobileNetwork/simGroups", "apiVersion": "2024-02-01", "name": "[if(empty(parameters('simGroupName')), 'placeHolderForValidation', parameters('simGroupName'))]", "location": "[parameters('location')]", "properties": { "mobileNetwork": { "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks', parameters('mobileNetworkName'))]" }, "encryptionKey": { "keyUrl": "[parameters('existingEncryptionKeyUrl')]" } }, "identity": "[if(not(empty(parameters('existingUserAssignedIdentityResourceId'))), createObject('type', 'UserAssigned', 'userAssignedIdentities', createObject(format('{0}', parameters('existingUserAssignedIdentityResourceId')), createObject())), createObject('type', 'None'))]", "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/mobileNetworks', parameters('mobileNetworkName'))]" ] }, { "type": "Microsoft.MobileNetwork/packetCoreControlPlanes", "apiVersion": "2024-02-01", "name": "[parameters('siteName')]", "location": "[parameters('location')]", "properties": { "sites": [ { "id": "[resourceId('Microsoft.MobileNetwork/mobileNetworks/sites', parameters('mobileNetworkName'), parameters('siteName'))]" } ], "sku": "G0", "ueMtu": "[parameters('ueMtu')]", "coreNetworkTechnology": "[parameters('coreNetworkTechnology')]", "platform": { "type": "AKS-HCI", "customLocation": "[if(empty(parameters('customLocation')), null(), createObject('id', parameters('customLocation')))]", "azureStackEdgeDevice": { "id": "[parameters('azureStackEdgeDevice')]" } }, "installation": { "desiredState": "[parameters('desiredState')]" }, "localDiagnosticsAccess": { "authenticationType": "Password" }, "controlPlaneAccessInterface": { "ipv4Address": "[parameters('controlPlaneAccessIpAddress')]", "name": "[parameters('controlPlaneAccessInterfaceName')]" } }, "dependsOn": [ "[resourceId('Microsoft.MobileNetwork/mobileNetworks/sites', parameters('mobileNetworkName'), parameters('siteName'))]", "[resourceId('Microsoft.MobileNetwork/mobileNetworks/slices', parameters('mobileNetworkName'), parameters('sliceName'))]" ] } ] }