Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 1.53 KB

README.md

File metadata and controls

41 lines (25 loc) · 1.53 KB

sre-ha

A project consisting of 2 seperate Terraform deployments that provision resources on AWS.

  • [TF] infra: Provisions core infrastructure resources - VPC, EKS Cluster with 2 nodegroups (sre-pool-main, sre-pool-sec), API Gateway, IAM Roles, ECR Repository.

  • [TF] deployment: Builds and pushes a Docker image that is used by a Lambda function which is also provisioned, creates a single endpoint in the API Gateway provisioned on infra.

  • [Go] lambda: Golang code built for Lambda & API Gateway which gets authentication information for a cluster, lists all Pods in kube-system namespace and returns an APIGatewayProxyResponse object so we can see valid reponse when accessing the API Gateway.


How to deploy?

Deploying as a whole:

Simply run ./deploy.sh script.

Deploying separetly:

To deploy a single Terraform deployment, you can simply run:

./deploy.sh <infra/deployment>

What if I dont like your default variables?

In case you want to change variables related to Terraform, you'll need to create a file named terraform.tfvars in the desired directory (infra, deployment) and provide your own variables.

You can view all variables accepted by each Terraform on variables.tf in the corresponding directory.


How to destory?

Destroying as a whole:

Simply run ./destroy.sh script.

Destroying separetly:

To destroy a single Terraform deployment, you can simply run:

./destroy.sh <infra/deployment>

--

AWS Architecture