-
Notifications
You must be signed in to change notification settings - Fork 0
X Initial Create Project CLI Commands
⚠️ I am creating this as an X-file just to get these steps down someplace. This markdown file can go away once we have established appropriate scripts.
- GCP Identity credentials must exist before the steps below.
- <SOMETHING> = Replace with a string.
- $CAPITALIZED_WORDS = environment variable (Linux)
- \ = extends shell command to the next line in terminal.
- Create Folder
gcloud resource-manager folders create --display-name=<NEW_FOLDER_NAME> \
--folder=$PHAC_ROOT_FOLDER_ID
- Create Project
gcloud projects create <PROJECT_ID> --folder=$PHAC_ROOT_FOLDER_ID
- Add Billing ID to project
❗ This was provided by Google after I noticed there was no CLI mention in the documentation page for linking project and billing account. At some point the
beta
in the CLI below will likely not be needed.
gcloud beta billing projects link <PROJECT_ID> \
--billing-account=$PHAC_BILLING_ID
- Create Security Group
gcloud identity groups create <PROJECT_ID>-owner@gcp.myorg.ca --organization=$ORG_ROOT_ID \
--group-type="security"
- Add Member to Group
gcloud identity groups memberships add --group-email=<GROUP_EMAIL> \
--member-email=<OWNER_EMAIL>
- Attach Group to Project with Owner Role
@TODO ADD CLI CODE HERE
- Create Budget and Alert
❗ NOTE: The billing ID must be attached to the project before this is run. It will fail otherwise.
gcloud billing budgets create --billing-account=$PHAC_BILLING_ID \
--display-name=<PROJECT_NAME>-budget --budget-amount=2000.00 \
--filter-projects=projects/<PROJECT_NAME> --threshold-rule=percent=0.50 \
--threshold-rule=percent=0.9 --threshold-rule=percent=1.0 \
--calendar-period=year
- If a folder needs multiple environments, then steps 3 - 7 will be repeated for each environment. I.e. Dev/Test/Prod
- Send email to user welcoming to GCP.
⚠️ As of this writing, the real focus of the above actions are to generate EXPERIMENTAL project spaces. We will need to flesh out and make changes as we onboard more environment types. Should the division be Exp/Test/Dev/Prod, or UCLL/PBMM?
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
Under Development
- This wiki and the documents being developed under it are living documents.
- They are all pre-decisional.
- Some of these documents were generated using chatGPT or were developed by other organizations for reuse and adaptation.
- Some of the documents in this wiki are in early early drafts, they make reference to things that do no exist or to process not yet being used.
- The Center of practice(COP) is best effort and will be developed iteratively. This includes the technology supporting the COP
- At the early stages of the COP expect change; short life cycles and rapid changes. Plan accordingly.
- Stability in the COP will materialize over time.
- For immediate reference engage your COP support channel, use the documentation as a secondary source.
- There is reference to the COP and PDCP in the documentation, these are the same entity. We haven't picked a name yet :)
All of the pages in this wiki should be considered draft, underdevelopment and needing review. None of these pages are official documentation. All of the pages are a work in progress and discussion is encouraged via the GitHub issues mechanism.
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧