Skip to content

Commit

Permalink
saving bootstrap in github
Browse files Browse the repository at this point in the history
  • Loading branch information
shashitnak committed May 21, 2024
1 parent 1528c1c commit 4968035
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FROM debian:latest
COPY entrypoint.sh /entrypoint.sh
COPY tailcall.tf /tmp/tailcall.tf
COPY config/config.graphql /tmp/config.graphql
COPY config/bootstrap /tmp/bootstrap

RUN apt-get update \
&& apt-get install -y wget git \
Expand All @@ -20,9 +21,5 @@ RUN apt-get update \
tee /etc/apt/sources.list.d/hashicorp.list \
&& apt update \
&& apt-get install -y terraform \
&& apt-get install -y curl \
&& curl -O https://github.com/tailcallhq/tailcall/releases/download/v0.82.21/tailcall-aws-lambda-bootstrap \
&& chmod +x tailcall-aws-lambda-bootstrap \
&& ./tailcall-aws-lambda-bootstrap \

ENTRYPOINT ["/entrypoint.sh"]
Binary file added config/bootstrap
Binary file not shown.
24 changes: 12 additions & 12 deletions tailcall.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ resource "aws_iam_role" "iam_for_tailcall" {
assume_role_policy = data.aws_iam_policy_document.assume_role.json
}

provider "github" {}

data "github_release" "tailcall" {
owner = "tailcallhq"
repository = "tailcall"
retrieve_by = "latest"
}

data "http" "bootstrap" {
url = data.github_release.tailcall.assets[index(data.github_release.tailcall.assets.*.name, "tailcall-aws-lambda-bootstrap")].browser_download_url
}
#provider "github" {}
#
#data "github_release" "tailcall" {
# owner = "tailcallhq"
# repository = "tailcall"
# retrieve_by = "latest"
#}
#
#data "http" "bootstrap" {
# url = data.github_release.tailcall.assets[index(data.github_release.tailcall.assets.*.name, "tailcall-aws-lambda-bootstrap")].browser_download_url
#}

resource "local_sensitive_file" "bootstrap" {
content_base64 = data.http.bootstrap.response_body_base64
content_base64 = filebase64("bootstrap")
filename = "config/bootstrap"
}

Expand Down

0 comments on commit 4968035

Please sign in to comment.