-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathazScript
More file actions
23 lines (14 loc) · 1.15 KB
/
azScript
File metadata and controls
23 lines (14 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
az appservice plan create -n upworkplan -g $rg --sku B1
az webapp create -g rg --plan upworkplan --name upworkpetapp-dev
az webapp create -g rg --plan upworkplan --name upworkpetapp-prod
az sql server create -n upworksql -g $rg -l centralus --admin-user dbadmin --admin-password Lion@@1775sql
az sql server firewall-rule create -n AllowLocalClient --server upworksql -g $rg --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0
az sql db create -g $rg --server upworksql--name PetSoreAppDB-dev --service-objective S0
az sql db create -g $rg --server upworksql--name PetSoreAppDB-prod --service-objective S0
az keyvault create -n connkey -g $rg
az keyvault secret set --value "connectionString" --vault-name connkey --name connkey
* select web app choose identity and enable it.
1- add acces policy to the user => choose secret,key&certification =>Select principal choose user
2- add access policy to webapp to secret => choose secret management => select principal choose web app name
3- select secret, secret name, version and copy "Secret Identifier"
4- go to webapp, configuration, connection and replace => value with @Microsoft.KeyVault(SecretUri=Secret Identifier)