Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
563f3f4
docs(infrastructure): add localstack,awslocal and tflocal as prerequi…
devnchill Jul 3, 2026
996af05
feat(infrastructure): script and make target to start localstack
devnchill Jul 3, 2026
f3db835
refactor(infrastructure): improve shell script robustness in start-lo…
devnchill Jul 3, 2026
a590a85
feat(infrastructure): WIP provision infra
devnchill Jul 4, 2026
7f340f4
refactor(infrastructure): add curl as prerequisite and use jq-generated
devnchill Jul 4, 2026
62ee13b
fix(infrastructure): generate random password instead of hardcoding i…
devnchill Jul 4, 2026
37a0ab8
refactor(infrastructure): set ENVIRONMENT to local if not set and
devnchill Jul 4, 2026
2c60dc9
fix(infrastructure): prevenet regenerating password for db and include
devnchill Jul 4, 2026
3eaa102
feat(infrastructure): upload env vars to SSM Parameters store
devnchill Jul 4, 2026
566baef
refactor(infrastructure): prevent leaking secrets in logs
devnchill Jul 4, 2026
364f306
fix(infrastructure): provision infra script uses backward compatible …
devnchill Jul 5, 2026
736bcdf
refactor(infrastructure): introduce force_new_deployment for live
devnchill Jul 5, 2026
8497802
fix(infrastructure): ai suggestions
devnchill Jul 5, 2026
42605b3
feat(infrastructure): add Make targets for LocalStack ECS tasks and u…
devnchill Jul 5, 2026
c682eb2
refactor(infrastructure): remove --allow-empty flag from load-env-par…
devnchill Jul 6, 2026
7e67d7b
refactor(infrastructure): get db_port dynamically instead of hardcodi…
devnchill Jul 6, 2026
8784c3f
docs(infrastructure): add note about rerunning provision script
devnchill Jul 6, 2026
98e739a
refactor(infrastructure): use localstack cli to check status
devnchill Jul 6, 2026
5553051
feat: LocalStack ECS deploy scripts, SSM fixes, backend Redis/Slack c…
devnchill Jul 9, 2026
a59f93f
fix: deploy-services.sh. cd to live dir, add tflocal prereq, fix subn…
devnchill Jul 8, 2026
78cc015
fix: pass env overrides via run-task for Redis port/TLS/auth
devnchill Jul 8, 2026
daa794a
fix(infrastructure): dynamic redis/alb config via ssm and tf output
devnchill Jul 9, 2026
b0f65b2
fix(infrastructure): cubic-dev-ai suggestions
devnchill Jul 9, 2026
a8223f1
fix(infrastructure): download dump if not present
devnchill Jul 10, 2026
6dc781a
refactor(infrastructure): use separate env for localstack to prevent …
devnchill Jul 10, 2026
6dd6477
fix(infrastructure): cubic bot suggestions
devnchill Jul 10, 2026
bbcb937
fix(infrastructure): frontend to be able to talk to backend
devnchill Jul 10, 2026
0d7bfdf
refactor(infrastructure): redundant NEXT_* urls for frontend docker i…
devnchill Jul 10, 2026
1412ff8
refactor(infrastructure): added a reusable check-prerequisites script
devnchill Jul 11, 2026
f44dd84
refactor(cubic ai suggestions):
devnchill Jul 11, 2026
d67e48f
refactor(sonar cloud suggestions):
devnchill Jul 11, 2026
72192f7
refactor(infrasturcture): rename provision make target to deploy-on-l…
devnchill Jul 11, 2026
b9faf87
chore(infrastructure): changes by make test-check
devnchill Jul 11, 2026
24cfb07
fix(infrastructure): add tflocal and awslocal into cspell wordlist
devnchill Jul 11, 2026
cf21568
refactor(infrastructure): remove fixme from lcoal.py regarding slack …
devnchill Jul 11, 2026
9648b39
refactor(infrastucture): remove previous providers_override if present
devnchill Jul 12, 2026
5723672
refactor(infra): remove redundant makefile targets after rebase
devnchill Jul 30, 2026
d59875b
fix(infra): ai bot suggestions on localstack makefile
devnchill Aug 1, 2026
d8dee7b
refactor(infra): make errors generic to be able to be used by local d…
devnchill Aug 1, 2026
732d194
feat(infra): add python-dotenv to load env vars for localstack
devnchill Aug 1, 2026
8f3dc50
feat(infra): add method to stop localstack
devnchill Aug 1, 2026
d4df59c
feat(infra): subcommands for localstack and tests for it
devnchill Aug 1, 2026
6ea1f89
feat(infra): add provision infra script
devnchill Aug 2, 2026
a898e34
feat(infra): cubic bot suggestion
devnchill Aug 2, 2026
a4f3fb7
feat(infra): port load env script
devnchill Aug 3, 2026
3b1b3bf
fix(infra): address bot problems
devnchill Aug 3, 2026
629b8e0
feat(infra): port deploy services script
devnchill Aug 5, 2026
7519880
fix(infra): ai bot suggestions
devnchill Aug 6, 2026
978bd8c
fix(infra): ai bot suggestions
devnchill Aug 6, 2026
9469ecb
fix(infra): ai bot suggestion
devnchill Aug 8, 2026
ae83dc8
refactor(infra): sonarqube suggestions
devnchill Aug 8, 2026
a311138
fix(infra): bump LocalStack to 2026.07.1 for awsvpc ALB target regist…
devnchill Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ __pycache__
!.env.e2e
!.env.e2e-tests
!.env.fuzz-tests
!.env.localstack.example
!.env.unit-tests
.github/instructions/snyk_rules.instructions.md
.idea
Expand Down
30 changes: 30 additions & 0 deletions backend/.env.localstack.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Backend environment variables for LocalStack provisioning.
#
# Copy this file to backend/.env.localstack and fill in your values.
# make load-env-params reads .env.localstack (not .env) to avoid
# overwriting Terraform-managed SSM parameters (DB, Redis, secrets).
#
# Excluded intentionally (set by Terraform or overridden by deploy-services.sh):
# DJANGO_DB_HOST, DJANGO_DB_NAME, DJANGO_DB_PORT, DJANGO_DB_USER,
# DJANGO_DB_PASSWORD, DJANGO_REDIS_HOST, DJANGO_REDIS_PORT,
# DJANGO_REDIS_PASSWORD, POSTGRES_*

DJANGO_ALGOLIA_APPLICATION_ID=
DJANGO_ALGOLIA_EXCLUDED_LOCAL_INDEX_NAMES=
DJANGO_ALGOLIA_WRITE_API_KEY=
DJANGO_CONFIGURATION=Local
DJANGO_ELEVENLABS_API_KEY=your-elevenlabs-api-key
DJANGO_GITHUB_APP_ID=your-github-app-id
DJANGO_GITHUB_APP_INSTALLATION_ID=your-github-app-installation-id
DJANGO_OPEN_AI_SECRET_KEY=your-open-ai-secret-key
DJANGO_PUBLIC_IP_ADDRESS=127.0.0.1
DJANGO_REDIS_AUTH_ENABLED=True
DJANGO_RELEASE_VERSION=local
DJANGO_SECRET_KEY=
DJANGO_SENTRY_DSN=your-sentry-dsn
DJANGO_SLACK_BOT_TOKEN=
DJANGO_SLACK_CLIENT_ID=
DJANGO_SLACK_CLIENT_SECRET=
DJANGO_SLACK_SEARCH_TOKEN=
DJANGO_SLACK_SIGNING_SECRET=
GITHUB_TOKEN=your-github-token
5 changes: 3 additions & 2 deletions backend/src/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class Base(Configuration):
NINJA_PAGINATION_PER_PAGE = API_PAGE_SIZE

REDIS_HOST = values.SecretValue(environ_name="REDIS_HOST")
REDIS_PORT = values.IntegerValue(environ_name="REDIS_PORT", default=6379)
REDIS_PASSWORD = values.SecretValue(environ_name="REDIS_PASSWORD")
REDIS_AUTH_ENABLED = values.BooleanValue(environ_name="REDIS_AUTH_ENABLED", default=True)
REDIS_USE_TLS = values.BooleanValue(environ_name="REDIS_USE_TLS", default=False)
Expand All @@ -159,7 +160,7 @@ class Base(Configuration):
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": f"{'rediss' if REDIS_USE_TLS else 'redis'}://{REDIS_HOST}:6379",
"LOCATION": f"{'rediss' if REDIS_USE_TLS else 'redis'}://{REDIS_HOST}:{REDIS_PORT}",
"OPTIONS": REDIS_CACHE_OPTIONS,
"TIMEOUT": 300,
}
Expand All @@ -168,7 +169,7 @@ class Base(Configuration):
RQ_QUEUES = {
"ai": {
"HOST": REDIS_HOST,
"PORT": 6379,
"PORT": REDIS_PORT,
"PASSWORD": REDIS_PASSWORD,
"DB": 1,
"DEFAULT_TIMEOUT": 300,
Expand Down
16 changes: 11 additions & 5 deletions backend/src/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
from configurations import values

from settings.base import Base
from settings.values import OptionalSecretValue


class Local(Base):
"""Local configuration."""

APP_NAME = "OWASP Nest Local"

ALLOWED_ORIGINS = (
"http://127.0.0.1:3000",
"http://localhost:3000",
ALLOWED_ORIGINS = values.ListValue(
environ_name="ALLOWED_ORIGINS",
default=[
"http://127.0.0.1:3000",
"http://localhost:3000",
],
)
CORS_ALLOWED_ORIGINS = ALLOWED_ORIGINS
CSRF_TRUSTED_ORIGINS = ALLOWED_ORIGINS
Expand All @@ -30,5 +34,7 @@ class Local(Base):
SECURE_SSL_REDIRECT = False
SESSION_COOKIE_SECURE = False

SLACK_COMMANDS_ENABLED = True
SLACK_EVENTS_ENABLED = True
SLACK_BOT_TOKEN = OptionalSecretValue(environ=False)
SLACK_COMMANDS_ENABLED = False
SLACK_EVENTS_ENABLED = False
SLACK_SIGNING_SECRET = OptionalSecretValue(environ=False)
3 changes: 3 additions & 0 deletions cspell/custom-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ acodec
agentic
ahmedxgouda
algoliasearch
alse
ansa
apexcharts
apk
Expand Down Expand Up @@ -121,6 +122,7 @@ dkr
dsn
dvo
eddsa
elbv
elevenlabs
env
envsubst
Expand Down Expand Up @@ -241,6 +243,7 @@ subgrp
superfences
tfbackend
tfdata
tflocal
tftest
tgz
tiktok
Expand Down
2 changes: 1 addition & 1 deletion docker/localstack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM localstack/localstack:2026.6.3@sha256:49d8f376123085bb7ee1b342c26dbb7beb48ba5fd7b45fc86952aecdf08c6ae2
FROM localstack/localstack:2026.07.1@sha256:58ac6d29304e2e472320d4279d287c3f40103d081234559a852b65db2da1e3d4
27 changes: 27 additions & 0 deletions frontend/.env.localstack.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Frontend environment variables for LocalStack provisioning.
#
# Copy this file to frontend/.env.localstack and fill in your values.
# make load-env-params reads .env.localstack (not .env) to avoid
# overwriting Terraform-managed SSM parameters (ALB URLs, secrets).
#
# NEXT_PUBLIC_* use relative URLs so the Docker image works behind the
# ALB — the browser resolves them against the current origin.
#
# Excluded intentionally (set by Terraform, derived from ALB DNS name):
# NEXTAUTH_URL, NEXT_SERVER_CSRF_URL, NEXT_SERVER_GRAPHQL_URL

NEXTAUTH_SECRET=
NEXT_PUBLIC_API_URL=/
NEXT_PUBLIC_CSRF_URL=/csrf/
NEXT_PUBLIC_ENVIRONMENT=local
NEXT_PUBLIC_GRAPHQL_URL=/graphql/
NEXT_PUBLIC_GTM_ID=
NEXT_PUBLIC_IDX_URL=/idx/
NEXT_PUBLIC_IS_PROJECT_HEALTH_ENABLED=true
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_RELEASE_VERSION=
NEXT_PUBLIC_SENTRY_DSN=
NEXT_SERVER_DISABLE_SSR=false
NEXT_SERVER_GITHUB_CLIENT_ID=your-github-client-id
NEXT_SERVER_GITHUB_CLIENT_SECRET=your-github-client-secret
1 change: 1 addition & 0 deletions infrastructure/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOCALSTACK_AUTH_TOKEN=
1 change: 1 addition & 0 deletions infrastructure/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
##@ Infrastructure

include infrastructure/make/localstack.mk
include infrastructure/make/maintenance.mk
include infrastructure/make/security.mk
include infrastructure/make/test.mk
109 changes: 109 additions & 0 deletions infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ This document provides instructions on how to setup the infrastructure for this
Ensure you have the following setup/installed:

- Setup Project: [CONTRIBUTING.md](https://github.com/OWASP/Nest/blob/main/CONTRIBUTING.md)
- jq: [jq](https://jqlang.github.io/jq/)
- OpenSSL: [OpenSSL](https://www.openssl.org/)
- Terraform: [Terraform Documentation](https://developer.hashicorp.com/terraform/docs)
- AWS CLI: [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
- Docker: [Docker](https://docs.docker.com/engine/install/)
- LocalStack CLI: [LocalStack CLI](https://www.localstack.cloud/aws/getting-started/installation/)
- AWSLocal CLI: [AWSLocal CLI](https://github.com/localstack/awscli-local)
- Terraform Local CLI: [Terraform Local CLI](https://github.com/localstack/terraform-local)
- An AWS account.

Note: Refer to the respective `README.md` files for more information.

## External Documentation
Expand Down Expand Up @@ -164,6 +171,108 @@ To do this locally:
- Visit the AWS Console > Systems Manager > Parameter Store.
- Populate all `DJANGO_*` secrets that have `to-be-set-in-aws-console` value.

## Local Development with LocalStack

These steps provision the entire infrastructure, build and push Docker images, and run ECS tasks locally using [LocalStack](https://www.localstack.cloud/).

> [!NOTE]
> All commands below are run from the project root.

### Prerequisites

- Docker
- LocalStack Pro (requires `LOCALSTACK_AUTH_TOKEN`)
- `jq`, `openssl` (usually pre-installed)
- `awslocal`, `tflocal` (see [Prerequisites](#prerequisites) above)

### 1. Create environment file

Create `infrastructure/.env`:

```bash
LOCALSTACK_AUTH_TOKEN=<your-pro-token>
```

Optionally set environment variables for the provisioning script:

```bash
# infrastructure/.env or export these
ENVIRONMENT=local
DOMAIN_NAME=localhost
DJANGO_CONFIGURATION=Local
DJANGO_SETTINGS_MODULE=settings.local
FORCE_NEW_DEPLOYMENT=true
```

### 2. Start LocalStack

```bash
make start-localstack
```

Wait for LocalStack to be ready (health check at `http://localhost.localstack.cloud:4566/_localstack/health`).

### 3. Provision everything

Builds and pushes Docker images, runs Terraform via `tflocal`, uploads SSM parameters, and deploys ECS services:

```bash
make deploy-on-localstack
```

> [!NOTE]
> If you want to recreate every resource, restart LocalStack and then rerun this script

This single command:

- Runs Terraform (VPC, subnets, security groups, ALB, ECS clusters/services, ECR repos, RDS, ElastiCache, ACM cert, S3 buckets, SSM params). The ECS services are created with `desired_count = 0` so no task fires before its image is pushed
- Builds the backend Docker image and pushes it to the local ECR
- Builds the frontend Docker image (with env vars resolved against the ALB DNS name) and pushes it to the local ECR
- Uploads local `backend/.env.localstack` and `frontend/.env.localstack` variables to the LocalStack SSM Parameter Store
- Overwrites the SSM runtime parameters with the real LocalStack host/ports, then scales the backend and frontend ECS services up so their tasks start with the corrected SSM values; LocalStack registers each task with the ALB target groups once RUNNING
- Waits for both target groups to report healthy

> [!NOTE]
> **Redis overrides for LocalStack compatibility:**
> LocalStack's ElastiCache mock ignores the configured Redis port and assigns a random one from its internal port range. The Terraform variable `django_redis_port` creates the SSM parameter as a placeholder, but the deploy step discovers the actual port at runtime via `awslocal elasticache describe-replication-groups` and overwrites the SSM value.
>
> Similarly, `DJANGO_REDIS_HOST` is overwritten with the LocalStack container's bridge IP — the default `localhost.localstack.cloud` resolves to loopback inside ECS containers and would be unreachable.

### 4. Run database tasks

Run ECS tasks (migrate, load data, index data) against the local cluster. Wait for each to finish before starting the next.

```bash
make ecs-migrate
make ecs-load-data # ensure backend/data/nest.dump exists first
make ecs-index-data
```

To run any other task definition (e.g. `nest-local-sync-data`):

```bash
make ecs-task TASK=sync-data
```

> [!NOTE]
> Task definition names follow the pattern `nest-{environment}-{task-name}`.

### 5. Clean up

To tear down all LocalStack resources:

```bash
cd infrastructure/live
tflocal destroy -auto-approve
```

To wipe everything (including images) and start fresh, restart LocalStack

```bash
# Stop LocalStack (Ctrl+C), then:
make start-localstack
```

## Populate ECR Repositories

ECR Repositories are used to store images used by ECS (Frontend + Backend + Scheduled Tasks)
Expand Down
6 changes: 6 additions & 0 deletions infrastructure/live/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ No resources.
| <a name="input_db_storage_type"></a> [db\_storage\_type](#input\_db\_storage\_type) | The storage type for the RDS database. | `string` | `"gp3"` | no |
| <a name="input_db_user"></a> [db\_user](#input\_db\_user) | The username for the RDS database. | `string` | `"nest_db_user"` | no |
| <a name="input_django_configuration"></a> [django\_configuration](#input\_django\_configuration) | The name of the Django configuration to use (e.g., Staging, Production). | `string` | n/a | yes |
| <a name="input_django_redis_auth_enabled"></a> [django\_redis\_auth\_enabled](#input\_django\_redis\_auth\_enabled) | Whether Redis authentication is enabled. | `bool` | `true` | no |
| <a name="input_django_redis_port"></a> [django\_redis\_port](#input\_django\_redis\_port) | The port of the Redis cache. | `string` | `"6379"` | no |
| <a name="input_django_redis_use_tls"></a> [django\_redis\_use\_tls](#input\_django\_redis\_use\_tls) | Whether Redis connections should use TLS. | `bool` | `true` | no |
| <a name="input_django_release_version"></a> [django\_release\_version](#input\_django\_release\_version) | The Django release version. | `string` | `"0.0.0"` | no |
| <a name="input_django_settings_module"></a> [django\_settings\_module](#input\_django\_settings\_module) | The location of the Django settings module to use (e.g., settings.staging, settings.production). | `string` | n/a | yes |
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | The domain name for the site. | `string` | n/a | yes |
Expand All @@ -110,6 +113,7 @@ No resources.
| <a name="input_enable_vpc_ssm_endpoint"></a> [enable\_vpc\_ssm\_endpoint](#input\_enable\_vpc\_ssm\_endpoint) | Whether to create SSM VPC endpoint. | `bool` | `false` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | The environment (e.g., staging, production). | `string` | n/a | yes |
| <a name="input_fixtures_bucket_name"></a> [fixtures\_bucket\_name](#input\_fixtures\_bucket\_name) | The name of the S3 bucket for fixtures. | `string` | `null` | no |
| <a name="input_force_new_deployment"></a> [force\_new\_deployment](#input\_force\_new\_deployment) | Whether to force a new deployment on each apply. | `bool` | `false` | no |
| <a name="input_frontend_desired_count"></a> [frontend\_desired\_count](#input\_frontend\_desired\_count) | The desired number of frontend tasks. | `number` | `1` | no |
| <a name="input_frontend_enable_auto_scaling"></a> [frontend\_enable\_auto\_scaling](#input\_frontend\_enable\_auto\_scaling) | Whether to enable auto scaling for frontend. | `bool` | `false` | no |
| <a name="input_frontend_image_tag"></a> [frontend\_image\_tag](#input\_frontend\_image\_tag) | The Docker frontend image tag. | `string` | n/a | yes |
Expand Down Expand Up @@ -138,10 +142,12 @@ No resources.
| <a name="output_backend_cluster_name"></a> [backend\_cluster\_name](#output\_backend\_cluster\_name) | The name of the ECS backend cluster. |
| <a name="output_backend_ecr_repository_url"></a> [backend\_ecr\_repository\_url](#output\_backend\_ecr\_repository\_url) | The URL of the backend ECR repository. |
| <a name="output_backend_service_name"></a> [backend\_service\_name](#output\_backend\_service\_name) | The name of the ECS backend service. |
| <a name="output_backend_target_group_arn"></a> [backend\_target\_group\_arn](#output\_backend\_target\_group\_arn) | The ARN of the backend target group. |
| <a name="output_fixtures_bucket_name"></a> [fixtures\_bucket\_name](#output\_fixtures\_bucket\_name) | The name of the S3 bucket for database fixtures. |
| <a name="output_frontend_cluster_name"></a> [frontend\_cluster\_name](#output\_frontend\_cluster\_name) | The name of the ECS frontend cluster. |
| <a name="output_frontend_ecr_repository_url"></a> [frontend\_ecr\_repository\_url](#output\_frontend\_ecr\_repository\_url) | The URL of the frontend ECR repository. |
| <a name="output_frontend_service_name"></a> [frontend\_service\_name](#output\_frontend\_service\_name) | The name of the ECS frontend service. |
| <a name="output_frontend_target_group_arn"></a> [frontend\_target\_group\_arn](#output\_frontend\_target\_group\_arn) | The ARN of the frontend target group. |
| <a name="output_frontend_url"></a> [frontend\_url](#output\_frontend\_url) | The URL to access the frontend. |
| <a name="output_nat_gateway_enabled"></a> [nat\_gateway\_enabled](#output\_nat\_gateway\_enabled) | Whether a NAT Gateway is enabled. |
| <a name="output_private_subnet_ids"></a> [private\_subnet\_ids](#output\_private\_subnet\_ids) | A list of private subnet IDs. |
Expand Down
8 changes: 7 additions & 1 deletion infrastructure/live/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module "backend" {
desired_count = var.backend_desired_count
enable_auto_scaling = var.backend_enable_auto_scaling
environment = var.environment
force_new_deployment = var.force_new_deployment
health_check_path = "/status/"
image_tag = var.backend_image_tag
kms_key_arn = module.kms.key_arn
Expand Down Expand Up @@ -121,6 +122,7 @@ module "frontend" {
desired_count = var.frontend_desired_count
enable_auto_scaling = var.frontend_enable_auto_scaling
environment = var.environment
force_new_deployment = var.force_new_deployment
health_check_path = "/api/health"
image_tag = var.frontend_image_tag
kms_key_arn = module.kms.key_arn
Expand Down Expand Up @@ -182,6 +184,7 @@ module "networking" {
module "parameters" {
source = "../modules/parameters"

alb_dns_name = module.alb.alb_dns_name
common_tags = local.common_tags
db_password_arn = module.database.db_password_arn
django_configuration = var.django_configuration
Expand All @@ -190,9 +193,12 @@ module "parameters" {
django_aws_static_bucket_name = module.storage.static_s3_bucket_name
django_db_host = module.database.db_proxy_endpoint
django_db_name = var.db_name
django_db_port = var.db_port
django_db_port = module.database.db_port
django_db_user = var.db_user
django_redis_auth_enabled = var.django_redis_auth_enabled
django_redis_host = module.cache.redis_primary_endpoint
django_redis_port = var.django_redis_port
django_redis_use_tls = var.django_redis_use_tls
django_release_version = var.django_release_version
django_settings_module = var.django_settings_module
enable_additional_parameters = var.enable_additional_parameters
Expand Down
10 changes: 10 additions & 0 deletions infrastructure/live/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ output "backend_service_name" {
value = module.backend.ecs_service_name
}

output "backend_target_group_arn" {
description = "The ARN of the backend target group."
value = module.alb.backend_target_group_arn
}

output "fixtures_bucket_name" {
description = "The name of the S3 bucket for database fixtures."
value = module.storage.fixtures_s3_bucket_name
Expand All @@ -48,6 +53,11 @@ output "frontend_service_name" {
value = module.frontend.ecs_service_name
}

output "frontend_target_group_arn" {
description = "The ARN of the frontend target group."
value = module.alb.frontend_target_group_arn
}

output "frontend_url" {
description = "The URL to access the frontend."
value = "https://${var.domain_name}"
Expand Down
1 change: 1 addition & 0 deletions infrastructure/live/terraform.production.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ frontend_min_count = 2
frontend_use_fargate_spot = false
project_name = "nest"
tasks_use_fargate_spot = false
force_new_deployment = false
1 change: 1 addition & 0 deletions infrastructure/live/terraform.staging.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ frontend_min_count = 1
frontend_use_fargate_spot = true
project_name = "nest"
tasks_use_fargate_spot = true
force_new_deployment = false
Loading
Loading