From b5e961fb3c46468ae3948508359bde98c4d9993b Mon Sep 17 00:00:00 2001 From: Shulhan Date: Thu, 14 Sep 2023 20:37:06 +0700 Subject: gcloud-image-test: add command to test OS Login The OS login require enable-oslogin=TRUE and optionally enable-oslogin-2fa=TRUE. --- gcloud-image-test.aww | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gcloud-image-test.aww b/gcloud-image-test.aww index eb63232..a52556e 100644 --- a/gcloud-image-test.aww +++ b/gcloud-image-test.aww @@ -20,6 +20,20 @@ gcloud compute ssh \ --command="lsblk -o NAME,UUID,MOUNTPOINTS; cat /etc/fstab; timedatectl show-timesync; localectl" \ arch-test +gcloud compute ssh \ + --zone={{.Val "gcloud::zone"}} \ + arch-test + +## Test OS Login. + +gcloud compute instances add-metadata arch-test \ + --zone={{.Val "gcloud::zone"}} \ + --metadata=enable-oslogin=TRUE + +gcloud compute instances add-metadata arch-test \ + --zone={{.Val "gcloud::zone"}} \ + --metadata=enable-oslogin-2fa=TRUE + ##---- Cleaning up. gcloud compute instances stop arch-test \ -- cgit v1.3