Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor demo updates #156

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions modules/acr-registry.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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'
// }
// }
1 change: 1 addition & 0 deletions private-project/private-modules.bicep
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// private-modules.bicep

module privateWebApp 'br/PrivateDemo:webapp:v2.0.0'= {
name: 'privateWebApp-Deploy1'
Expand Down
9 changes: 9 additions & 0 deletions samples/9-deploy-single-app-module.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 15 additions & 11 deletions scripts/deploy-private-acr.azcli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading