Skip to content

Commit

Permalink
Add personal-storage-permissions target
Browse files Browse the repository at this point in the history
  • Loading branch information
janboll committed Nov 26, 2024
1 parent 7b4f58e commit 0e948cb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cluster-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,16 @@ local-deploy-provision-shard:
../templatize.sh $(DEPLOY_ENV) deploy/provisioning-shards.tmpl.yml deploy/local-provisioning-shards.yml -e zoneResourceId=$${ZONE_RESOURCE_ID},cxSecretsKeyVaultUrl=$${CX_SECRETS_KV_URL},cxMiKeyVaultUrl=$${CX_MI_KV_URL},maestroRestUrl=http://localhost:8001,maestroGrpUrl=localhost:8090
@cat deploy/local-provisioning-shards.yml

personal-runtime-config:
personal-storage-permissions:
USER_OBJECT_ID=$(shell az ad signed-in-user show --query id -o tsv) && \
STORAGEACCOUNTID=$(shell az storage account show -n ${OIDC_STORAGE_ACCOUNT} -g ${RESOURCEGROUP} --query id -o tsv) && \
az role assignment create \
--role "Storage Blob Data Contributor" \
--assignee $${USER_OBJECT_ID} \
--scope "$${STORAGEACCOUNTID}"
.PHONY: personal-storage-permissions

personal-runtime-config: personal-storage-permissions
@TENANT_ID=$(shell az account show --query tenantId --output tsv) && \
OIDC_BLOB_SERVICE_ENDPOINT=$(shell az storage account show -n ${OIDC_STORAGE_ACCOUNT} -g ${RESOURCEGROUP} --query primaryEndpoints.blob -o tsv) && \
OIDC_ISSUER_BASE_ENDPOINT=$(shell az storage account show -n ${OIDC_STORAGE_ACCOUNT} -g ${RESOURCEGROUP} --query primaryEndpoints.web -o tsv) && \
Expand Down

0 comments on commit 0e948cb

Please sign in to comment.