Skip to content

Instantly share code, notes, and snippets.

@isaiahtaylor
Created July 8, 2021 18:31
Show Gist options
  • Select an option

  • Save isaiahtaylor/8534f1970339c2a6f06d61765c69fa5e to your computer and use it in GitHub Desktop.

Select an option

Save isaiahtaylor/8534f1970339c2a6f06d61765c69fa5e to your computer and use it in GitHub Desktop.

Revisions

  1. isaiahtaylor created this gist Jul 8, 2021.
    17 changes: 17 additions & 0 deletions lambda.tf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    data "external" "lambda_source_trigger" {
    program = ["${path.module}/gethash.sh"]

    query = {
    directory = "${path.module}/lambdas/mylambda"
    }
    }

    resource "null_resource" "deploy_lambda" {
    triggers = {
    go_source_hash = "${data.external.lambda_source_trigger.result["checksum"]}"
    }

    provisioner "local-exec" {
    # Your deploy code
    }
    }