aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-01-07 14:42:24 +0700
committerShulhan <ms@kilabit.info>2023-02-11 14:23:18 +0700
commit7d02a718948a380c2c3a9070afe867f6d2d68c1e (patch)
treeb511777fe075c7847f993a47a6cdab630e3b1b6e
parente64dc6ad3d159450a65ddcc5a35f08a5d65eea85 (diff)
downloadcompute-archlinux-image-builder-7d02a718948a380c2c3a9070afe867f6d2d68c1e.tar.xz
all: set the image deprecated in 30d, obsolete in 37d, and deleted in 44d
This changes the state of image but the image still need to be deleted manually.
-rw-r--r--gcloud-image-publish.aww6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcloud-image-publish.aww b/gcloud-image-publish.aww
index d16e0f8..c238673 100644
--- a/gcloud-image-publish.aww
+++ b/gcloud-image-publish.aww
@@ -12,6 +12,12 @@ gcloud compute images create {{.Val "host::image"}} \
--guest-os-features=GVNIC,UEFI_COMPATIBLE,VIRTIO_SCSI_MULTIQUEUE \
--description="Arch linux image with ops-agent. See https://github.com/shuLhan/compute-archlinux-image-builder"
+gcloud compute images deprecate {{.Val "host::image"}} \
+ --state=ACTIVE \
+ --deprecate-in=30d \
+ --obsolete-in=37d \
+ --delete-in=44d
+
gcloud compute images list --no-standard-images
gcloud compute images describe {{.Val "host::image"}}