/IaaC

Primary LanguageHCL

Requirements

Name Version
Terragrunt 0.45.0
Terraform 1.4.4

Install Terraform

Install Terragrunt

Feature of Terragrunt over Terraform

  • Allow us to pass variable in s3_backend like storage bucket.

Terragrunt & Terraform Version Managers

Documentation

Usage

RECOMMENDED: Run separately from each config directory containing terragrunt.hcl file.

terragrunt plan
terragrunt apply
[Optional] terragrunt apply -auto-approve  # if you want to apply the changes with approval.
terragrunt destroy

OPTIONAL: Run everything at once from a specific directory.

terragrunt run-all plan
terragrunt run-all apply
terragrunt run-all destroy --terragrunt-ignore-external-dependencies

Connect with the cluster

  • Configure aws cli
  • Check aws --version
  • Create or update the kubeconfig file for your cluster: aws eks --region eu-west-2 update-kubeconfig --name local-practice-dev-EKS-Cluster

aws ecr get-login-password --region region | docker login --username AWS --password-stdin <aws_account_id>.dkr.ecr.region.amazonaws.com

kubectl config use-context minikube minikube dahsboard

AWS Load Balancer annotations and docs link

Find and Delete files or directories recursively

  • find . -name ".terraform.lock.hcl" -type f -delete
  • find . -name ".terragrunt-cache" -type d -exec rm -rf {} +

export KUBECONFIG=$(pwd) /managing-eks-terraform-cluster_config

ArgoCD Credentials

  • user: admin
  • password: kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d