diff --git a/terraform/production/.terraform.lock.hcl b/terraform/production/.terraform.lock.hcl index c413679b..b4f33d19 100644 --- a/terraform/production/.terraform.lock.hcl +++ b/terraform/production/.terraform.lock.hcl @@ -2,20 +2,21 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/google" { - version = "4.37.0" + version = "5.16.0" + constraints = ">= 5.16.0" hashes = [ - "h1:3T5iRtAy50QsDHUngJpS0o6Udaofe5Pk2YbjQZjoZz4=", - "zh:01ae3e36f33651d2fa38499a13385f7a12df34cd6c5bbe59458f970f9e78a39a", - "zh:1c5bd5bb926216db863d1915f1c7c8ef5c4828931d7ac5446b1eec6f226bdd40", - "zh:1eac85f93f315a60b04206ada873b762453f126b5757cfc26a9073f2fafbd6a8", - "zh:422d7945c5556731d84ea4877a2d029f258e32efc59f4a473edfae0a6a1e925d", - "zh:66162f95d14c0db6c6fefb0f513192d840d401779603ee897518e9802748dde9", - "zh:679c23db26203be260b602fe88a7e622fca135074ab2746e567d048c07704113", - "zh:87404af4b1cad2922af395e229cdf683578c0ac99ccb2a141ada1cd623c850e5", - "zh:a8eec14b312b306aead96f880c62613a4000ae8b80e7aeef28054de5a380a7b8", - "zh:e367ce43096157cff544b0597383a266c964480c81f3f6d917cfdaccaaa6ee59", + "h1:nH6EClFZez8dDMWupYF5xNQumxIFTdgpuyWlhxbFk3E=", + "zh:042580a3a6cceb6419ebe4623e1c60e749c258ae8937f5ef27513a3d6634a832", + "zh:0df2700da3f43a62300fd6e4ea1cc02271ed2689220ba3c2dfac007662af3c59", + "zh:1bb54214a87b9de33c5a95eb2ce2f4e9409a1aa3eca24b24197347b0d49bd458", + "zh:236509e2a2aa53d45fd9b39c82acfd7bb4f45657f034911197c91c52ce883483", + "zh:3ccd08e3343e8b58e91a59cf9520cf8c647829b956847d3402bb5036f8741bfa", + "zh:5c9901fdd3ee3573b2a9386911602dbba8e6481018ceb3fbcb97d2f9a907e186", + "zh:a4cb4076454b8d4b7905e51634e635ca0d5c734b50eb34daf505bb3ac8894157", + "zh:baaed507e5e3a49cd1f89d7fa875d3d13731c73f0cfac62c6abacc11c5e3f070", + "zh:da8d471d3e760fc3533ff5c3636a701e34f63d5d92f9e54096879d420698c1a7", + "zh:f159beb34a08fea7b607bf469a2cff8e28ecc8c7dde3ecd96436589661d93f0b", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", - "zh:f7bd4c60d7c9f36fadc177fe190ee62836aac38b1cbb6deebc8f60d3a72b5a4b", - "zh:fcf20dbf699f784cd04db84960beb5bb887ac5f049856251ec7f664dfacf83b9", + "zh:f680e5ba7404ca2e24087a8f6076a2e33a721727684cc7862684265eb0d4c5fd", ] } diff --git a/terraform/production/google_artifact_registry_repository.tf b/terraform/production/google_artifact_registry_repository.tf new file mode 100644 index 00000000..487f4206 --- /dev/null +++ b/terraform/production/google_artifact_registry_repository.tf @@ -0,0 +1,39 @@ +resource "google_artifact_registry_repository" "app" { + location = local.region + repository_id = "app" + format = "DOCKER" + cleanup_policies { + id = "delete" + action = "DELETE" + condition { + older_than = "86400s" # 1 day + } + } + cleanup_policies { + id = "keep-minimum-versions" + action = "KEEP" + most_recent_versions { + keep_count = 1 + } + } +} + +resource "google_artifact_registry_repository" "cmd" { + location = local.region + repository_id = "cmd" + format = "DOCKER" + cleanup_policies { + id = "delete" + action = "DELETE" + condition { + older_than = "86400s" # 1 day + } + } + cleanup_policies { + id = "keep-minimum-versions" + action = "KEEP" + most_recent_versions { + keep_count = 1 + } + } +} diff --git a/terraform/production/versions.tf b/terraform/production/versions.tf new file mode 100644 index 00000000..5be3f816 --- /dev/null +++ b/terraform/production/versions.tf @@ -0,0 +1,8 @@ +terraform { + required_providers { + google = { + source = "hashicorp/google" + version = ">= 5.16.0" + } + } +}