GoogleCloudPlatform / GoogleCloudPlatform/pubsec-declarative-toolkit
Automation: derive DIRECTORY_CUSTOMER_ID from the org - replace manual procedure in readme/settings.yaml
- Dominant language
- Shell
- Stars
- 36
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
as part of overall cluster + lz automaton in #446
Change the manual instructions to code
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/gh446-hub/solutions/core-landing-zone/setters.yaml#L82
```
# a list of directory customer IDs from which users can be added to IAM policies, see YAML file for more info:
# org/org-policies/iam-allowed-policy-member-domains.yaml
# this setting MUST be changed to include the GCP org's directory ID and any other directory containing users that will need IAM roles assigned
# run 'gcloud organizations list' as described in https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains#retrieving_customer_id
allowed-policy-domain-members: |
- "C...kc"
```
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/main/docs/landing-zone-v2/README.md#fetch-the-packages
Testing
```
michael@cloudshell:~ (kcc-oi)$ gcloud organizations list --filter="${DIRECTORY_CUSTOMER_ID}" '--format=value(DIRECTORY_CUSTOMER_ID)'
C0...kc
```
Add to
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/gh446-hub/solutions/setup.sh
and remove hardcoded from
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/gh446-hub/solutions/vars.sh
and
https://github.com/ssc-spc-ccoe-cei/gcp-tools/blob/main/scripts/bootstrap/setup-kcc.sh
Contributor guide
Assessment
This issue has not been assessed yet.