Skip to content

Commit

Permalink
add in post deploy script
Browse files Browse the repository at this point in the history
  • 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.
22 changes: 22 additions & 0 deletions post_deploy_script.sh
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

0 comments on commit b875bd7

Please sign in to comment.