ssc-spc-ccoe-cei / gcp-tools

This repo is meant to be a submodule of the gcp-repo-template repository. https://github.com/ssc-spc-ccoe-cei/gcp-repo-template
3 stars 3 forks source link

Add loggingAdmin role and switch off alpha api in gcloud logging settings update - line 53 #47

Open fmichaelobrien opened 1 year ago

fmichaelobrien commented 1 year ago

https://github.com/ssc-spc-ccoe-cei/gcp-tools/blob/main/scripts/bootstrap/setup-kcc.sh#L53

EMAIL=$(gcloud config list --format json|jq .core.account | sed 's/"//g')

# Adding logging admin role binding
gcloud organizations add-iam-policy-binding "${ORG_ID}" --member "user:${EMAIL}" --role roles/logging.admin

# Update the logging for region
gcloud logging settings update --organization="$ORG_ID" --storage-location="$REGION"