From 7ac06704a3932a828c851f4c312480dfb728d0c2 Mon Sep 17 00:00:00 2001 From: Glenn Musa <4622125+glennmusa@users.noreply.github.com> Date: Tue, 22 Feb 2022 19:19:58 +0000 Subject: [PATCH] whitespace --- src/bicep/examples/newWorkload/newWorkload.bicep | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/bicep/examples/newWorkload/newWorkload.bicep b/src/bicep/examples/newWorkload/newWorkload.bicep index e8357ff65..0b30085cd 100644 --- a/src/bicep/examples/newWorkload/newWorkload.bicep +++ b/src/bicep/examples/newWorkload/newWorkload.bicep @@ -12,7 +12,6 @@ targetScope = 'subscription' // REQUIRED PARAMETERS - @minLength(3) @maxLength(24) @description('A prefix, 3 to 24 characters in length, to append to resource names (e.g. "dev", "test", "prod", "mlz"). It defaults to "mlz".') @@ -23,7 +22,6 @@ param resourcePrefix string @description('A suffix, 3 to 6 characters in length, to append to resource names (e.g. "dev", "test", "prod", "mlz"). It defaults to "mlz".') param resourceSuffix string = 'mlz' - @description('The region to deploy resources into. It defaults to the deployment location.') param location string = deployment().location @@ -39,8 +37,6 @@ param hubVirtualNetworkResourceId string = mlzDeploymentVariables.hub.Value.virt param logAnalyticsWorkspaceResourceId string = mlzDeploymentVariables.logAnalyticsWorkspaceResourceId.Value param firewallPrivateIPAddress string = mlzDeploymentVariables.firewallPrivateIPAddress.Value - - @description('The address prefix for the network spoke vnet.') param virtualNetworkAddressPrefix string = '10.0.125.0/26' @@ -79,6 +75,16 @@ param logStorageSkuName string = 'Standard_GRS' @description('A string dictionary of tags to add to deployed resources. See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources?tabs=json#arm-templates for valid settings.') param tags object = {} +/* + + NAMING CONVENTION + + Here we define a naming conventions for resources. + + First, we take `resourcePrefix` and `resourceSuffix` by params. + Then, using string interpolation "${}", we insert those values into a naming convention. + +*/ var resourceToken = 'resource_token' var nameToken = 'name_token' @@ -90,7 +96,6 @@ var networkSecurityGroupNamingConvention = replace(namingConvention, resourceTok var storageAccountNamingConvention = toLower('${resourcePrefix}st${nameToken}unique_storage_token') var subnetNamingConvention = replace(namingConvention, resourceToken, 'snet') - var workloadName = 'workload' var workloadShortName = 'wl' var workloadResourceGroupName = replace(resourceGroupNamingConvention, nameToken, workloadName) @@ -100,6 +105,7 @@ var workloadLogStorageAccountName = take(workloadLogStorageAccountUniqueName, 23 var workloadVirtualNetworkName = replace(virtualNetworkNamingConvention, nameToken, workloadName) var workloadNetworkSecurityGroupName = replace(networkSecurityGroupNamingConvention, nameToken, workloadName) var workloadSubnetName = replace(subnetNamingConvention, nameToken, workloadName) + var defaultTags = { 'DeploymentType': 'MissionLandingZoneARM' }