Q1 Flashcards
You are creating a CLI script that creates an Azure web app and related services in Azure App Service.
The correct script is
$gitrepo=https://github.com/samples/app1
$webappname=mywebapp
Create a resource group.
az group create –location westeurope –name myResourceGroup
Create an App Service plan in ′FREE′ tier.
az appservice plan create –name $webappname –resource-group myResourceGroup –sku FREE
Create a web app.
az webapp create –name $webappname –resource-group myResourceGroup –plan $webappname
Deploy code from a public GitHub repository.
az webapp deployment source config –name $webappname –resource-group myResourceGroup \
–repo-url $gitrepo –branch master –manual-integration
azure/key-vault/secrets/quick-create-powershell
1.Get-AzSubscription
2.Set-AzContext -SubscriptionId $subscriptionID
3.Get-AzStorageAccountKey -ResourceGroupName $resGroup -Name $storAcct
4.$secretvalue = ConvertTo-SecureString $storAcctKey -AsPlainText -Force
Set-AzKeyVaultSecret -VaultName $vaultName -Name $secretName -SecretValue $secretvalue
5.Get-AzKeyVaultSecret -VaultName $vaultName