42 lines
812 B
HCL
42 lines
812 B
HCL
# Create Cloud Run service
|
|
resource "google_cloud_run_v2_service" "jppg" {
|
|
name = "jmespath-playground"
|
|
location = var.default_region
|
|
invoker_iam_disabled = true
|
|
|
|
template {
|
|
containers {
|
|
image = "skoszewski/jmespath-playground:${var.image_version}"
|
|
name = "jmespath-playground-1"
|
|
ports {
|
|
container_port = 3000
|
|
}
|
|
}
|
|
}
|
|
|
|
scaling {
|
|
max_instance_count = 1
|
|
}
|
|
|
|
deletion_protection = var.deletion_protection
|
|
|
|
lifecycle {
|
|
ignore_changes = [
|
|
client
|
|
]
|
|
}
|
|
}
|
|
|
|
resource "google_cloud_run_domain_mapping" "jppg" {
|
|
name = "jmespath-playground.gcp-lab.koszewscy.waw.pl"
|
|
location = var.default_region
|
|
|
|
spec {
|
|
route_name = google_cloud_run_v2_service.jppg.name
|
|
}
|
|
|
|
metadata {
|
|
namespace = var.project_id
|
|
}
|
|
}
|