Created
May 21, 2021 02:07
-
-
Save barendb/22bf431aa2137830c5a14687919f58a0 to your computer and use it in GitHub Desktop.
Run Bash script in Terraform
This file contains 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
/* | |
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