This repository contains the Terraform configuration files for setting up the infrastructure of the Shodapp project on AWS. The infrastructure includes an EKS cluster, PostgreSQL database, ACM certificates, Route 53 DNS records, and ArgoCD for continuous deployment.
This Terraform configuration is used to deploy the infrastructure on a CloudGuru sandbox account. It uses cross-account access to perform ACM validation and create the CNAME and A records for the ALB in a personal AWS account that hosts the domain.
Sensitive data such as AWS credentials, database passwords, and API keys are managed using GitHub repository secrets. If you fork this repository, make sure to update these secrets in your forked repository to match your environment.
- Terraform v1.3.7 or later
- AWS CLI configured with access to both CloudGuru (sandbox) and personal AWS accounts
- GitHub repository secrets configured for AWS credentials and other sensitive information
-
Clone the repository:
git clone https://github.com/batzsalmassi/shodapp-k8s-infra.git cd shodapp-k8s-infra
-
Initialize Terraform:
terraform init
-
Plan the infrastructure changes:
terraform plan
-
Apply the infrastructure changes:
terraform apply
This file contains the main configuration for the Terraform project, including provider configurations and the VPC module.
This file sets up the ACM certificate and Route 53 DNS records for domain validation and ALB configuration.
This file configures the PostgreSQL database instance, including subnet and security group settings.
This file defines the outputs for the Terraform project, such as the PostgreSQL endpoint and ACM certificate ARN.
This file sets up the IAM roles and policies required for the EKS cluster and AWS Load Balancer Controller.
This file configures the ArgoCD deployment using Helm and sets up the necessary Route 53 DNS records.
This file configures the Helm provider and installs the AWS Load Balancer Controller using Helm.
This file sets up the EKS cluster, including managed node groups and Kubernetes resources.
This file defines the variables used in the Terraform project, such as AWS region, VPC CIDR, and EKS cluster settings.
This workflow handles the Terraform plan and apply process, triggered by pull requests and pushes to the main branch.
This workflow deploys the ArgoCD application after the Terraform infrastructure has been successfully applied.