Skip to content

Instantly share code, notes, and snippets.

@barendb
Created May 21, 2021 02:07
Show Gist options
  • Save barendb/22bf431aa2137830c5a14687919f58a0 to your computer and use it in GitHub Desktop.
Save barendb/22bf431aa2137830c5a14687919f58a0 to your computer and use it in GitHub Desktop.
Run Bash script in Terraform
/*
example of executing a bash script in tf
*/
locals {
tables = [
aws_dynamodb_table.organization.name
]
}
resource "null_resource" "bind_tables_to_datawarehouse_export_kinesis_stream" {
triggers = {
redeployment = md5(join("", local.tables))
}
provisioner "local-exec" {
command = "${path.module}/bind_tables_to_kinesis_stream.sh '${join(",", local.tables)}' '${var.kinesis_datawarehouse_export_arn}'"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment