From e579147f54b22042d2d21910c6968b40cd0c1238 Mon Sep 17 00:00:00 2001 From: jmservera <8036360+jmservera@users.noreply.github.com> Date: Fri, 26 Jul 2024 23:30:52 +0200 Subject: [PATCH] change names for clarity --- ocpp-server/infra/main.bicep | 24 +++++++++---------- ocpp-server/infra/modules/appgw.bicep | 2 +- ocpp-server/infra/modules/customWebName.bicep | 2 +- ocpp-server/infra/modules/webapp.bicep | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ocpp-server/infra/main.bicep b/ocpp-server/infra/main.bicep index 1c1ed34..5ff2510 100644 --- a/ocpp-server/infra/main.bicep +++ b/ocpp-server/infra/main.bicep @@ -27,7 +27,7 @@ var webHostName = '${webARecordName}.${customDnsZoneName}' // Add a Nat Gateway for outbound access module natgw './modules/natgw.bicep' = { - name: 'natGwService' + name: '${deployment().name}-natGwService' params: { natGwName: 'natgw-${uniqueString(resourceGroup().id)}' location: resourceGroup().location @@ -35,7 +35,7 @@ module natgw './modules/natgw.bicep' = { } // Creates a VNet with 3 subnets: default, gateway and private endpoints module virtualNetwork './modules/virtualNetwork.bicep' = { - name: 'vNet' + name: '${deployment().name}-vNet' params: { virtualNetworkName: 'vnet-${uniqueString(resourceGroup().id)}' natGatewayId: natgw.outputs.natGatewayId @@ -44,14 +44,14 @@ module virtualNetwork './modules/virtualNetwork.bicep' = { // creates a private web pub sub service module webPubSub './modules/webPubSub.bicep' = { - name: 'webPubSubService' + name: '${deployment().name}-webPubSubService' params: { serviceName: 'webpubsub-${uniqueString(resourceGroup().id)}' } } module hub './modules/webPubSubHub.bicep' = { - name: 'webPubSubHub' + name: '${deployment().name}-webPubSubHub' params: { serviceName: webPubSub.outputs.serviceName hubName: pubSubHubName @@ -62,7 +62,7 @@ module hub './modules/webPubSubHub.bicep' = { // creates a private endpoint for the web pub sub service // to be used by the app gateway module webPubSubPrivateEndpoint './modules/privateEndpoint.bicep' = { - name: 'webPubSubPrivateEndpoint' + name: '${deployment().name}-webPubSubPrivateEndpoint' params: { privateLinkResource: webPubSub.outputs.serviceId subnetId: virtualNetwork.outputs.privateSubnetId @@ -73,7 +73,7 @@ module webPubSubPrivateEndpoint './modules/privateEndpoint.bicep' = { } module webApp './modules/webapp.bicep' = { - name: 'webAppService' + name: '${deployment().name}-webAppService' params: { webAppName: 'webapp-${uniqueString(resourceGroup().id)}' sku: 'B1' @@ -85,7 +85,7 @@ module webApp './modules/webapp.bicep' = { } module webPrivateEndpoint './modules/privateEndpoint.bicep' = { - name: 'webPrivateEndpoint' + name: '${deployment().name}-webPrivateEndpoint' params: { privateLinkResource: webApp.outputs.appServiceId subnetId: virtualNetwork.outputs.privateSubnetId @@ -96,7 +96,7 @@ module webPrivateEndpoint './modules/privateEndpoint.bicep' = { } module storagePrivateEndpoint './modules/privateEndpoint.bicep' = { - name: 'webStoragePrivateEndpoint' + name: '${deployment().name}-webStoragePrivateEndpoint' params: { privateLinkResource: webApp.outputs.storageAccountId subnetId: virtualNetwork.outputs.privateSubnetId @@ -107,7 +107,7 @@ module storagePrivateEndpoint './modules/privateEndpoint.bicep' = { } module appGw './modules/appgw.bicep' = { - name: 'appGwService' + name: '${deployment().name}-appGwService' params: { appgwName: 'appgw-${uniqueString(resourceGroup().id)}' location: resourceGroup().location @@ -128,7 +128,7 @@ module appGw './modules/appgw.bicep' = { // update A record with appGW public IP module wssdns './modules/dns.bicep' = if (customDnsZoneName != '') { - name: 'dnsServicePubSub' + name: '${deployment().name}-dnsServicePubSub' scope: resourceGroup(dnsZoneRG) params: { dnszoneName: customDnsZoneName @@ -138,7 +138,7 @@ module wssdns './modules/dns.bicep' = if (customDnsZoneName != '') { } module wwwdns './modules/dns.bicep' = if (customDnsZoneName != '') { - name: 'dnsServiceWeb' + name: '${deployment().name}-dnsServiceWeb' scope: resourceGroup(dnsZoneRG) params: { dnszoneName: customDnsZoneName @@ -148,7 +148,7 @@ module wwwdns './modules/dns.bicep' = if (customDnsZoneName != '') { } module customDomain 'modules/customWebName.bicep' = if (customDnsZoneName != '') { - name: 'customDomain' + name: '${deployment().name}-customDomain' params: { dnszoneName: customDnsZoneName dnsZoneRG: dnsZoneRG diff --git a/ocpp-server/infra/modules/appgw.bicep b/ocpp-server/infra/modules/appgw.bicep index da02b4d..ee2a319 100644 --- a/ocpp-server/infra/modules/appgw.bicep +++ b/ocpp-server/infra/modules/appgw.bicep @@ -65,7 +65,7 @@ resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' } module publicIpAddress './ipAddress.bicep' = { - name: 'publicIpAddress' + name: '${deployment().name}-appgw-publicIpAddress' params: { publicIpAddressName: 'ip-${uniqueString(resourceGroup().id)}' domainNameLabel: 'd${uniqueString(resourceGroup().id)}' // ensure domain name starts with a letter diff --git a/ocpp-server/infra/modules/customWebName.bicep b/ocpp-server/infra/modules/customWebName.bicep index 04d34af..699ab1c 100644 --- a/ocpp-server/infra/modules/customWebName.bicep +++ b/ocpp-server/infra/modules/customWebName.bicep @@ -25,7 +25,7 @@ resource webKeyVaultCertificate 'Microsoft.KeyVault/vaults/secrets@2024-04-01-pr // Add a TXT record to the DNS zone to verify the custom domain module verification 'dnstxt.bicep' = { - name: 'dnsServiceWebTxt' + name: '${deployment().name}-dnsServiceWebTxt' scope: resourceGroup(dnsZoneRG) params: { dnszoneName: dnszoneName diff --git a/ocpp-server/infra/modules/webapp.bicep b/ocpp-server/infra/modules/webapp.bicep index bd82143..50f77f1 100644 --- a/ocpp-server/infra/modules/webapp.bicep +++ b/ocpp-server/infra/modules/webapp.bicep @@ -49,7 +49,7 @@ resource appServicePlan 'Microsoft.Web/serverfarms@2020-06-01' = { // create a storage account to deploy the app module storage 'storage.bicep' = { - name: 'storage' + name: '${deployment().name}-web-storage' params: { name: 'webdeploy-${uniqueString(resourceGroup().id)}' }