https://github.com/carlosrodlop/terraform-lib
It contains terraform modules and roots deployments for Kubernetes cluster in different Cloud providers
https://github.com/carlosrodlop/terraform-lib
aws eks gcp gke iac kuberntes terraform
Last synced: 5 months ago
JSON representation
It contains terraform modules and roots deployments for Kubernetes cluster in different Cloud providers
- Host: GitHub
- URL: https://github.com/carlosrodlop/terraform-lib
- Owner: carlosrodlop
- License: mit
- Created: 2023-01-03T15:36:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-10T13:11:52.000Z (over 2 years ago)
- Last Synced: 2023-11-10T14:57:52.975Z (over 2 years ago)
- Topics: aws, eks, gcp, gke, iac, kuberntes, terraform
- Language: HCL
- Homepage:
- Size: 4.12 MB
- Stars: 2
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Terraform Library
Welcome to my Terraform Library, a storage place for my assets related to my journey around Terraform and Iac for the Cloud.
---
  [](https://github.com/zricethezav/gitleaks#pre-commit) [](https://github.com/awslabs/git-secrets) [](https://github.com/bridgecrewio/checkov) [](https://github.com/terraform-docs/terraform-docs/) [](https://github.com/carlosrodlop/terraform-lib/actions/workflows/mdLinkChecker.yml)
| [Documentation](https://github.com/carlosrodlop/carlosrodlop-docs/tree/main/hashicorp) | [References](https://github.com/carlosrodlop/carlosrodlop-docs#terraform) |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
## About
- It contains deployments and configuration for Kubernetes Cluster and companion infrastructure for different Cloud providers.
## Usage
- Terraform operations use makefile inside every cloud provider (e.g. `aws`) to give you examples of the most common operation command set. There are targets for the most common scenarios: init (with backend), plan/apply and destroy but also a general action target to run any terraform command.
- Copy `.env.example` to `.env` to customize the environment variables. Although, some variables can be passed as arguments to target in the make command (`ROOT` for example).
- Values Customization:
- Variables: Copy `shared.tfvars.example` to `shared.tfvars` inside the cloud/provider/env folder. Then, copy `.auto.tfvars.example` to `.auto.tfvars` inside the root folders. Customize files with your values. It relies on Variables inheritance. See [Terraform - Variable Precedence - Learning-Ocean](https://learning-ocean.com/tutorials/terraform/terraform-variable-precedence)
- Backend:
1. Apply the Root `state-bucket` creates a remote backend
2. Copy `backend.tf.example` to `backend.tf` in every Root to use the backend created in the previous step.
- It uses submodules. For example, the Helm provider uses the values from the [Kubernetes library](https://github.com/carlosrodlop/K8s-lib). Helm provider is separated from the creation of the K8s cluster [Stacking with managed Kubernetes cluster resources](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs#stacking-with-managed-kubernetes-cluster-resources)
- ⚠️ IMPORTANT - It requires `git submodule update --init --recursive`
- Dev Container approach: `make run` using images from [docker-lib](https://github.com/carlosrodlop/docker-lib)