Skip to content

Commit

Permalink
feat(infra): Docker registry configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
koistya committed Feb 4, 2024
1 parent 3c2d5be commit 3d57bc9
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions infra/core/storage.tf → infra/core/artifacts.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
# Google Cloud Storage
# Cloud Storage for Build Artifacts

# Docker Registry
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/artifact_registry_repository
resource "google_artifact_registry_repository" "cloud_run" {
location = var.gcp_region
repository_id = "cloud-run"
description = "Docker repository for Cloud Run services."
format = "DOCKER"

cleanup_policies {
id = "cloud-run-cleanup"
action = "KEEP"

most_recent_versions {
keep_count = 2
}
}
}

# Cloud Storage Bucket
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket
#
# NOTE: The Google account under which the Terraform Cloud agents run must have
# the owner role on the target domain name in order to create Google Cloud
# Storage buckets using that domain name. You can update the list of owner
# members in the Google Search Console at the following URL:
# https://search.google.com/search-console/welcome?new_domain_name=example.com
# https://cloud.google.com/storage/docs/domain-name-verification

resource "google_storage_bucket" "pkg" {
name = "pkg.${var.root_level_domain}"
location = var.gcp_region
Expand Down

0 comments on commit 3d57bc9

Please sign in to comment.