Created
April 9, 2020 19:51
-
-
Save tomlarkworthy/b3aef845aaaaffa1842e756d87578910 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build a customized image of Camunda to include the cloud sql postgres socket factory library | |
# Required to connect to Cloud SQL | |
# Built using Cloud Build, image stored in GCR | |
resource "null_resource" "camunda_cloudsql_image" { | |
triggers = { | |
# Rebuild if we change the base image or the local docker | |
image = "eu.gcr.io/${local.project}/camunda_cloudsql:${local.config.base_image_tag}_${sha1(local_file.dockerfile.content)}" | |
} | |
provisioner "local-exec" { | |
command = <<-EOT | |
gcloud builds submit \ | |
--project ${local.project} \ | |
--tag ${self.triggers.image} \ | |
${path.module}/.build | |
EOT | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment