Skip to content

Commit

Permalink
fix(env-vars): fix missing env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Cali93 committed Jul 7, 2023
2 parents daa7b0c + fd2e9b5 commit fe3a339
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:
TF_VAR_hcaptcha_secret: ${{ secrets.HCAPTCHA_SECRET }}
TF_VAR_direct_url: ${{ secrets.DIRECT_URL }}
TF_VAR_database_url: ${{ secrets.DATABASE_URL }}
TF_VAR_redis_host: ${{ secrets.REDIS_HOST }}
TF_VAR_redis_port: ${{ secrets.REDIS_PORT }}
TF_VAR_redis_password: ${{ secrets.REDIS_PASSWORD }}
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
15 changes: 15 additions & 0 deletions terraform/ecs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,18 @@ variable "supabase_jwt_secret" {
type = string
sensitive = true
}

variable "redis_host" {
type = string
sensitive = true
}

variable "redis_port" {
type = string
sensitive = true
}

variable "redis_password" {
type = string
sensitive = true
}
17 changes: 5 additions & 12 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,8 @@ module "redis_global" {

redis_name = "cloud-auth-redis"
app_name = "${terraform.workspace}_redis_${local.app_name}"
vpc_id = module.eu-central-1.vpc_id
node_type = var.redis_node_type
global = true

private_subnet_ids = module.eu-central-1.private_subnets

allowed_ingress_cidr_blocks = tolist(toset([
module.us-east-1.cidr_block,
module.eu-central-1.cidr_block,
module.ap-southeast-1.cidr_block
]))
}
vpc_id = module.vpc.vpc_id
node_type = "cache.t2.micro"

allowed_ingress_cidr_blocks = module.vpc.private_subnets
}
2 changes: 2 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ variable "redis_host" {
type = string
sensitive = true
}

variable "redis_port" {
type = string
sensitive = true
}

variable "redis_password" {
type = string
sensitive = true
Expand Down

0 comments on commit fe3a339

Please sign in to comment.