Skip to content

Commit

Permalink
adding archive file
Browse files Browse the repository at this point in the history
  • Loading branch information
shashitnak committed Jun 19, 2024
1 parent 957f84f commit 2db02d7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion aws/tailcall.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,22 @@ resource "local_sensitive_file" "bootstrap" {
filename = var.BOOTSTRAP_PATH
}

resource "local_sensitive_file" "archive_file" {
resource "local_sensitive_file" "config" {
for_each = fileset(path.module, "config/**")
content_base64 = filebase64("${each.key}")
filename = "${each.key}"
}

data "archive_file" "tailcall" {
type = "zip"
depends_on = [
local_sensitive_file.bootstrap,
local_sensitive_file.config
]
source_dir = "config"
output_path = "tailcall.zip"
}

resource "aws_lambda_function" "tailcall" {
depends_on = [
data.archive_file.tailcall
Expand Down

0 comments on commit 2db02d7

Please sign in to comment.