Skip to content
Snippets Groups Projects
Commit 62d2de45 authored by Danylo Vanin (EPAM)'s avatar Danylo Vanin (EPAM)
Browse files

[GONRG-9098] Fix rule

parent bb86ce02
No related branches found
No related tags found
1 merge request!1374[GONRG-9098] Added optional custom domain
Pipeline #242230 waiting for manual action
......@@ -6,14 +6,14 @@ locals {
# Force undelete of an Endpoints Service before creating a new Endpoints Service with the same name.
# If a Cloud Endpoints Service has recently been deleted, it cannot be re-created/updated without first undeleting it
resource "terraform_data" "undelete_endpoints_service" {
count = local.custom_domain ? 1 : 0
count = local.custom_domain ? 0 : 1
provisioner "local-exec" {
command = "gcloud endpoints services undelete ${local.ingress_domain} --project ${var.project_id} || true"
}
}
resource "google_endpoints_service" "default" {
count = local.custom_domain ? 1 : 0
count = local.custom_domain ? 0 : 1
depends_on = [terraform_data.undelete_endpoints_service]
service_name = local.ingress_domain
project = var.project_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment