Skip to content

agentsofthesystem/architect-deploy

Repository files navigation

architect-deploy

Terraform Capability for Architect

Pre-requisites

  • Must have terraform installed; v1.7.3+
  • AWS Credentials Key & Secret with appropriate permissions.

Variables Section inputs.

The following are pre-existing AWS items manually created that are provided as inputs

  1. Docker Image for Task Definition.
  2. ACM SSL Certificate ARN. - Eventually will want to have Terraform create this and attach to the Load Balancer DNS.
  3. Route 53 - Zone ID of appropriate Hosted Zone

Getting started.

  1. export AWS_ACCESS_KEY_ID=abc123
  2. export AWS_SECRET_ACCESS_KEY=abc123
  3. terraform init
  4. terraform validate
  5. terraform apply
  6. terraform destroy (to remove)

Backend / State

During testing it's okay to let the terraform state file reside on the machine (local). However, in production, this might be deleted and it ought be configured to be remote.

S3 Backend

https://developer.hashicorp.com/terraform/language/settings/backends/s3

Future Work.

  • Will want to parameterize different deployments; eg tags, resource names. That way I can run "terraform apply" for multiple sites; eg staging, test, dev. (Workspaces?)
  • May be able to get domain name from the hosted zone.
  • Three subnets for networking?

Acknowledgement

Articles / Repos / Tools that were found useful in creating this terraform repository:

  1. https://github.com/aws-samples/deploy-python-flask-microservices-to-aws-using-open-source-tools/tree/main
  2. https://developer.hashicorp.com/terraform/tutorials/aws-get-started
  3. https://dev.to/kieranjen/ecs-fargate-service-auto-scaling-with-terraform-2ld
  4. https://dev.to/ajeetraina/implementing-automated-rds-backup-and-restore-strategy-with-terraform-4o3e

About

Terraform Capability for Architect

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages