BIENVENIDO
Canal gcloud
**********************************
COMMAND: gcloud projects
--------------------------------------------------
ADMINISTRACION DE RECURSOS - ORGANIZACION / FOLDER / PROYECTOS
• ¿Cómo gestiono los recursos (Hablemos en C...
minuto 2:50 ---- jerarquia de accesibilidad a los recursos
• Organizing your GCP resources INGLES
#PARA CREAR ORGANIZATION y/o FOLDER
https://cloud.google.com/resource-man...
https://cloud.google.com/resource-man...
-------------------------------------------------------------
COMANDOS QUE PARTICIPAN PARA LA ADMINISTRACION DE RECURSOS
PARA LA ORGANIZACION
https://cloud.google.com/sdk/gcloud/r...
https://cloud.google.com/sdk/gcloud/r...
gcloud organizations list
organization_id = 123456
gcloud resource-manager folders create facturacion
--display-name="Area Facturacion"
--organization=123456
gcloud resource-manager folders list --organization=123456
gcloud resource-manager folders create ambulatorio
--display-name="Sector Ambulatorio"
--folder=facturacion
gcloud resource-manager folders list --folder=facturacion
gcloud resource-manager folders
add-iam-policy-binding facturacion
--member=user:[email protected]
--role=role/viewer
---------------------------------------------
#CREAR PROJECTO
PERMISSION:
resourcemanager.projects.create
https://cloud.google.com/resource-man...
ROLE
roles/resourcemanager.projectCreator
https://cloud.google.com/resource-man...
---------------------------------------------------------
https://cloud.google.com/resource-man...
gcloud projects create example-foo-bar-1 --name="Happy project" --labels=type=happy
gcloud projects list
gcloud projects update example-foo-bar-1 --name="Foo Bar & Grill"
gcloud projects describe sign-in-21-ccf
gcloud projects get-iam-policy sign-in-1975-ccf
gcloud projects add-iam-policy-binding example-foo-bar-1 --member="user:[email protected]" --role="roles/cloudbuild.builds.builder"
gcloud projects get-iam-policy example-foo-bar-1
gcloud projects set-iam-policy example-foo-bar-1 policy.json / poolicy.yaml
'user:[email protected]' --role='roles/editor'
gcloud projects get-iam-policy example-foo-bar-1
gcloud projects remove-iam-policy-binding example-foo-bar-1 --member='user:[email protected]' --role='roles/editor'
gcloud projects get-iam-policy example-foo-bar-1
gcloud projects delete example-foo-bar-1
gcloud proyects undelete example-foo-bar-1
------------------------------------------------------
Your teammate launched 3 instances using gcloud compute instances create
command with all the required flags. After few mins, you checked the
console and found 0 instances in the GCE virtual machine section.
How would you identify the project against which the command executed?
A. gcloud auth application-default
B. gcloud projects list
C. gcloud debug
D. gcloud config list
-------------------------------------------------------------------------
Your company has been working on an application for the last three months
and is now ready to roll out the same to the UAT environment for beta
testing. Your manager has asked you to create a replica of dev project.
Which is the best way to clone/replicate the existing project?
A. Go to Manage resources under IAM & admin section,
select the project you want to clone and click on the Clone button on top.
B. Go to the dashboard, click on three vertical dots within Project info
and click Clone Project.
C. Execute gcloud command:
gcloud project clone-project --source Eazeteachs-dev-prj
--destination Eazeteachs-uat-prj.
D. None of the above.
-------------------------------------------------------------------------
What is the correct command to create an IAM user using Google Cloud CLI?
A. gcloud iam create --name “[email protected]” --role “roles/editor”
B. gcloud iam create-user --name “[email protected]” --role “roles/editor”
C. gcloud projects add-iam-policy-binding Eazeteachs-prj
--member “user:[email protected]” --role “roles/editor”
D. gcloud projects add-iam-user-binding Eazeteachs-prj
--member “user:[email protected]” --role “roles/editor”
---------------------------------------------------------------------------
Your colleague has asked for help in creating an IAM role using Google Cloud
CLI. Which of the following is the correct command to create an IAM role?
A. gcloud iam roles create viewer-role --project Eazeteachs-prj
--file role-definition.yaml
B. gcloud project roles create --type iam viewer-role
--project Eazeteachs-prj --file role-definition.yaml