This repository contains Terraform configurations to deploy Backstage IO on AWS ECS. The Backstage image is expected to be configured with in-memory settings rather than using an RDS and Redis.
- Terraform installed
- AWS credentials configured
alb.tf
: Configures the Application Load Balancer (ALB) for the ECS services.ecr.tf
: Configures the Elastic Container Registry (ECR) for storing Docker images.ecs.tf
: Configures the ECS cluster.ecs_backstage_service.tf
: Configures the ECS service for Backstage.main.tf
: Main configuration file that sets up the AWS provider and availability zones.outputs.tf
: Defines the outputs of the Terraform configuration.providers.tf
: Specifies the required providers.variables.tf
: Defines the variables used in the Terraform configuration.vpc.tf
: Configures the Virtual Private Cloud (VPC).
-
Clone the repository:
git clone https://github.com/Spofibo/terraform-aws-ecs-backstage-io.git cd terraform-aws-ecs-backstage-io
-
Initialize Terraform:
terraform init
-
Review the plan:
terraform plan
-
Apply the configuration:
terraform apply
The ECS service will not work and will fail until a Backstage image has been pushed to the ECR repository. Follow these steps to build and push the Backstage image:
-
Build the Docker image:
docker build -t <your-backstage-image> .
-
Tag the Docker image:
docker tag <your-backstage-image>:latest <ecr_repository_url>:latest
-
Log in to ECR:
aws ecr get-login-password --region <your-region> | docker login --username AWS --password-stdin <ecr_repository_url>
-
Push the Docker image to ECR:
docker push <ecr_repository_url>:latest
Replace <your-backstage-image>
with your desired image name and <ecr_repository_url>
with the URL of your ECR repository.
ecr_backstage_repository_url
: The URL of the ECR Backstage repository.backstage_docker_instructions
: Instructions for building and pushing the Docker image to ECR.alb_dns_name
: The DNS name of the ALB.
- The Backstage IO deployment is configured with in-memory settings rather than using an RDS and Redis.
- Ensure that your AWS credentials have the necessary permissions to create the resources defined in the Terraform configuration.
This project is licensed under the MIT License.