From 5e989ff47ed6d6c3c971d99a0a83f817944c510c Mon Sep 17 00:00:00 2001 From: Elkhan Date: Tue, 12 Dec 2023 23:37:46 -0500 Subject: [PATCH] Minor demo updates --- modules/acr-registry.bicep | 72 ++++++++++++------------ private-project/private-modules.bicep | 1 + samples/9-deploy-single-app-module.bicep | 9 +++ scripts/deploy-private-acr.azcli | 26 +++++---- 4 files changed, 61 insertions(+), 47 deletions(-) diff --git a/modules/acr-registry.bicep b/modules/acr-registry.bicep index 168bd22..a8d683e 100644 --- a/modules/acr-registry.bicep +++ b/modules/acr-registry.bicep @@ -26,39 +26,39 @@ resource acrResource 'Microsoft.ContainerRegistry/registries@2021-06-01-preview' output loginServer string = acrResource.properties.loginServer // Sample on Insert Resource -@description('Generated from exisiting storage account') -resource bsuniquesmb 'Microsoft.Storage/storageAccounts@2022-09-01' = { - sku: { - name: 'Standard_GRS' - } - kind: 'StorageV2' - name: 'bs27uniquesmb928' - location: 'eastus' - tags: { - } - properties: { - minimumTlsVersion: 'TLS1_0' - allowBlobPublicAccess: true - networkAcls: { - bypass: 'AzureServices' - virtualNetworkRules: [] - ipRules: [] - defaultAction: 'Allow' - } - supportsHttpsTrafficOnly: true - encryption: { - services: { - file: { - keyType: 'Account' - enabled: true - } - blob: { - keyType: 'Account' - enabled: true - } - } - keySource: 'Microsoft.Storage' - } - accessTier: 'Hot' - } -} +// @description('Generated from exisiting storage account') +// resource bsuniquesmb 'Microsoft.Storage/storageAccounts@2022-09-01' = { +// sku: { +// name: 'Standard_GRS' +// } +// kind: 'StorageV2' +// name: 'bs27uniquesmb928' +// location: 'eastus' +// tags: { +// } +// properties: { +// minimumTlsVersion: 'TLS1_0' +// allowBlobPublicAccess: true +// networkAcls: { +// bypass: 'AzureServices' +// virtualNetworkRules: [] +// ipRules: [] +// defaultAction: 'Allow' +// } +// supportsHttpsTrafficOnly: true +// encryption: { +// services: { +// file: { +// keyType: 'Account' +// enabled: true +// } +// blob: { +// keyType: 'Account' +// enabled: true +// } +// } +// keySource: 'Microsoft.Storage' +// } +// accessTier: 'Hot' +// } +// } diff --git a/private-project/private-modules.bicep b/private-project/private-modules.bicep index 139ad85..3f9d065 100644 --- a/private-project/private-modules.bicep +++ b/private-project/private-modules.bicep @@ -1,3 +1,4 @@ +// private-modules.bicep module privateWebApp 'br/PrivateDemo:webapp:v2.0.0'= { name: 'privateWebApp-Deploy1' diff --git a/samples/9-deploy-single-app-module.bicep b/samples/9-deploy-single-app-module.bicep index 0b22fd2..0e1065d 100644 --- a/samples/9-deploy-single-app-module.bicep +++ b/samples/9-deploy-single-app-module.bicep @@ -12,5 +12,14 @@ module appService '../modules/appservice.bicep' = { } } +resource storageTest2 'Microsoft.Storage/storageAccounts@2021-02-01' = { + name: 'cllstg011123' + location: deploymentLocation + kind: 'StorageV2' + sku: { + name: 'Standard_LRS' + } +} + @description('App Host full name.') output myNewBicepAppHostName string = appService.outputs.webAppHostName diff --git a/scripts/deploy-private-acr.azcli b/scripts/deploy-private-acr.azcli index 7d2ded3..02abe1f 100644 --- a/scripts/deploy-private-acr.azcli +++ b/scripts/deploy-private-acr.azcli @@ -7,32 +7,36 @@ az account show --query name az group list -o table # Deploy 15-deploy-private =-repo.bicep -az group create --name mydemo15 --location eastus -az deployment group create --resource-group mydemo15 --template-file .\modules\acr-registry.bicep --parameters acrName=azwelshug0315 -c +az group create --name cllnov01 --location eastus +az deployment group create --resource-group cllnov01 --template-file .\modules\acr-registry.bicep --parameters acrName=clldemonov2023 -c # List all the ACR accounts az acr list -o table az acr list --query [].name -o table # Get login server name -az acr show --resource-group mydemo15 --name azwelshug0315.azurecr.io --query loginServer -# Sample response: azwelshug0315.azurecr.io +az acr show --resource-group cllnov01 --name clldemonov2023.azurecr.io --query loginServer +# Sample response: clldemonov2023.azurecr.io -az acr repository list --name latamprivateregistry.azurecr.io --output table +## ----------------------- + +az acr repository list --name clldemonov2023.azurecr.io --output table # Publish modules/storage-param.bicep -az bicep publish --file .\modules\storage-param.bicep --target br:latamprivateregistry.azurecr.io/bicep/modules/storage:v1.1.0 -# Artifact reference latamprivateregistry.azurecr.io/bicep/modules/storage:v1.0.0 +az bicep publish --file .\modules\storage-param.bicep --target br:clldemonov2023.azurecr.io/bicep/modules/storage:v1.0.0 +# Artifact reference clldemonov2023.azurecr.io/bicep/modules/storage:v1.0.0 # Publish modules/appservice.bicep -az bicep publish --file .\modules\appservice.bicep --target br:latamprivateregistry.azurecr.io/bicep/modules/appservice:v2 -# Artifact reference latamprivateregistry.azurecr.io/bicep/modules/appservice:v1 +az bicep publish --file .\modules\appservice.bicep --target br:clldemonov2023.azurecr.io/bicep/modules/appservice:v2 +# Artifact reference clldemonov2023.azurecr.io/bicep/modules/appservice:v1 # Deploy Azure resources using private Bicep registry -az deployment group create -g 'mydemo15' -f .\samples\15-deploy-private-repo.bicep -c +az deployment group create -g 'cllnov01' -f .\samples\15-deploy-private-repo.bicep -c + + # Query the list of exisiting web apps az webapp list -o table -az webapp show -g mydemo15 --name newapp031555 -o table +az webapp show -g cllnov01 --name newapp031555 -o table