Exam Objectives
1 Compare authentication methods
1a Describe authentication methods
1b Choose an authentication method based on use case
1c Differentiate human vs. system auth methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export TF_CREDS=~/.config/gcloud/terraform-admin.json | |
# create service account in Terraform Admin Project | |
gcloud iam service-accounts create terraform \ | |
--display-name "Terraform Admin Account" | |
# download JSON credentials | |
gcloud iam service-accounts keys create ${TF_CREDS} \ | |
--iam-account terraform@${TF_ADMIN}.iam.gserviceaccount.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List all Google Compute Engine instance resources: | |
$ gcloud compute instances list | |
List Compute Engine instance resources that have machineType f1-micro: | |
$ gcloud compute instances list --filter="machineType:f1-micro" | |
List Compute Engine instance resources with zone prefix us and not | |
MachineType f1-micro: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To use the "confirm" target inside another target, | |
# use the " if $(MAKE) -s confirm ; " syntax. | |
mycommand: | |
@if $(MAKE) -s confirm ; then \ | |
execute_your_command_here ; \ | |
fi | |
.PHONY: mycommand | |
# The CI environment variable can be set to a non-empty string, |
OlderNewer