Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(infra): Docker registry configuration #391

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading