Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Terraform/OpenTofu configuration for shared resources #61

Open
marcelovilla opened this issue Sep 19, 2024 · 2 comments
Open

Create Terraform/OpenTofu configuration for shared resources #61

marcelovilla opened this issue Sep 19, 2024 · 2 comments

Comments

@marcelovilla
Copy link
Contributor

marcelovilla commented Sep 19, 2024

Currently, there's a configuration file for shared resources, including the network configuration. I suggest we expand that configuration (and maybe split it into different files) to include other shared resources we'll need across the different environments, such as:

  • ECR repositories1 to store the service images. For now, I think we need two repositories: one for the dashboard and one for the API.
  • AWS IAM role to use as authentication in GitHub Actions (GHA). To avoid using long-lived credentials in the GHA workflows, I recommend creating an AWS IAM role with limited permissions, which we can use to authenticate and deploy/update the infrastructure from within GHA.

Footnotes

  1. Judging by the deploy GHA workflow, there's probably an existing repository. We can import that into the Terraform/OpenTofu configuration we write to keep everything in the same place.

@leej3
Copy link
Collaborator

leej3 commented Sep 20, 2024

there's probably an existing repository.

I used docker hub. Switching to ECR is also fine.

For now, I think we need to repositories

I'm assuming you mean images here. Also, to match the development override it would be good to build and push the base image too.

@marcelovilla
Copy link
Contributor Author

marcelovilla commented Sep 20, 2024

@leej3:

I'm assuming you mean images here. Also, to match the development override it would be good to build and push the base image too.

I mean ECR repositories. Each repository will contain the images of a particular service (e.g., API and dashboard). Each image will be tagged with a git commit hash so we can easily identify what has been deployed and eventually rollback to a previous commit if we ever need to. Regarding pushing the base image, see: #64 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants