GoogleCloudPlatform / GoogleCloudPlatform/pubsec-declarative-toolkit
automate setters.yaml project/org/email via SED in cluster automation script
- Dominant language
- Shell
- Stars
- 36
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
As part of the dual step automation (kcc cluster + LZ kpt applies)
see
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/dev/solutions/landing-zone/README.md#0-set-default-logging-storage-location
```
export PROJECT_ID=$(gcloud config list --format 'value(core.project)')
export REGION=northamerica-northeast1
export ORG_ID=$(gcloud projects get-ancestors $PROJECT_ID --format='get(id)' | tail -1)
export EMAIL=$(gcloud config list --format json|jq .core.account | sed 's/"//g')
gcloud organizations add-iam-policy-binding "${ORG_ID}" --member "user:${EMAIL}" --role roles/logging.admin
gcloud alpha logging settings update --organization=$ORG_ID --storage-location=$REGION
```
Contributor guide
Assessment
This issue has not been assessed yet.