-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tim-allen-ck
committed
Jun 24, 2024
1 parent
61ca96b
commit b875bd7
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
|
||
tre_id=$(grep tre_id config.yaml|awk '{print $2}') | ||
|
||
sa_id=$(az storage account show -g rg-${tre_id} -n stweb${tre_id} --query "id"|awk -F\" '{print $2}') | ||
user_id=$(az account show --query "id"|awk -F\" '{print $2}') | ||
user_email=$(az account show --query "user.name"|awk -F\" '{print $2}') | ||
|
||
az role assignment create --role "Storage Blob Data Contributor" --assignee ${user_email} --scope ${sa_id} | ||
az role assignment create --role "Storage Blob Data Reader" --assignee ${user_email} --scope ${sa_id} | ||
az role assignment create --role "Storage Table Data Contributor" --assignee ${user_email} --scope ${sa_id} | ||
az role assignment create --role "Storage Table Data Reader" --assignee ${user_email} --scope ${sa_id} | ||
az role assignment create --role "Storage Queue Data Contributor" --assignee ${user_email} --scope ${sa_id} | ||
az role assignment create --role "Storage Queue Data Reader" --assignee ${user_email} --scope ${sa_id} | ||
az keyvault set-policy --name kv-${tre_id} --upn ${user_email} --certificate-permissions all | ||
az keyvault set-policy --name kv-${tre_id} --upn ${user_email} --secret-permissions all | ||
az keyvault set-policy --name kv-${tre_id} --upn ${user_email} --key-permissions all | ||
|
||
sleep 60s | ||
|
||
make letsencrypt |