Skip to content

Commit

Permalink
change names for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
jmservera committed Jul 26, 2024
1 parent eec96fe commit e579147
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions ocpp-server/infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ 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
}
}
// 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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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'
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ocpp-server/infra/modules/appgw.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ocpp-server/infra/modules/customWebName.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ocpp-server/infra/modules/webapp.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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)}'
}
Expand Down

0 comments on commit e579147

Please sign in to comment.