Skip to content

Instantly share code, notes, and snippets.

@tomlarkworthy
Created April 9, 2020 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomlarkworthy/b3aef845aaaaffa1842e756d87578910 to your computer and use it in GitHub Desktop.
Save tomlarkworthy/b3aef845aaaaffa1842e756d87578910 to your computer and use it in GitHub Desktop.
# 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