Skip to content

Commit

Permalink
taking config from env in tf
Browse files Browse the repository at this point in the history
  • Loading branch information
shashitnak committed May 20, 2024
1 parent ef12e58 commit 6e42fa8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ echo "LS: $(ls)"
echo "TF_CONTENT: $(TF_CONTENT)"
cd /tmp
terraform init
TF_VAR_AWS_REGION=$AWS_REGION terraform apply
TF_VAR_AWS_REGION=$AWS_REGION TF_VAR_CONFIG_PATH=$CONFIG terraform apply
8 changes: 6 additions & 2 deletions tailcall.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ variable "AWS_REGION" {
type = string
}

variable "CONFIG_PATH" {
type = string
}

provider "aws" { region = var.AWS_REGION }

data "aws_iam_policy_document" "assume_role" {
Expand Down Expand Up @@ -53,8 +57,8 @@ resource "local_sensitive_file" "bootstrap" {
}

resource "local_sensitive_file" "config" {
content_base64 = filebase64("config/config.graphql")
filename = "config/config.graphql"
content_base64 = filebase64(var.CONFIG_PATH)
filename = var.CONFIG_PATH
}

data "archive_file" "tailcall" {
Expand Down

0 comments on commit 6e42fa8

Please sign in to comment.