google_api_gateway_test/terraform/artifact_registry.tf

19 lines
781 B
Terraform
Raw Normal View History

2024-10-16 00:45:34 +00:00
# Cloud run requires that the docker image URL points to either the official docker repos or a google-hosted one. This sets up artifact registry to use my self-hosted harbor instance so I don't have to script out building the docker image in google cloud.
resource "google_artifact_registry_repository" "docker_repo" {
project = google_project.project.project_id
location = var.region
repository_id = "docker-repo"
description = "Docker image repository"
format = "DOCKER"
mode = "REMOTE_REPOSITORY"
remote_repository_config {
description = "My Harbor"
docker_repository {
custom_repository {
uri = "https://harbor.fizz.buzz"
}
}
}
2024-10-16 01:37:12 +00:00
depends_on = [google_project_service.service["artifactregistry"], ]
2024-10-16 00:45:34 +00:00
}