- Create a secret name
grafana-postgres-on-ecs
in AWS Secret Manager with the following secrets.
Key | Value |
---|---|
DATABASE_USERNAME |
Username for database (e.g. postgres) |
DATABASE_PASSWORD |
Password for database (e.g. passw0rd) |
DATABASE_HOST |
postgres.service.local |
DATABASE_NAME |
Name of the database (e.g. postgres) |
-
We need to have two ECR repositories
grafana
andpostgres
. Set the variablerepository_name
inmodules/grafana/variables.tf
andmodules/postgres/variables.tf
. The subdirectoryrepo/ops/repository
contains the terraform code to create the ECR repositories, and the subdirectoryrepo/src/
contains the Dockerfile and the code for the services. -
Add your public key to
main.tf
to allow ssh access to the EC2 instances.