Files
awesome-kubernetes/docs/terraform.md
Inaki Fernandez a50bcdf40f Jan 31st
2022-01-31 12:42:44 +01:00

58 KiB
Raw Blame History

Hashicorp Terraform & Packer. Kubernetes Boilerplates

{=="It's not controversial to provision resources with code. It shouldn't be controversial to deploy and manage resources with code" (Jaana Dogan)==}

HashiCorp Learning Resources Reference Guide

Packer

Terraform

Terraform Cloud

HCL

CDK Cloud Development Kit Terraform

Python Boto3 and Terraform

Terraform Infracost

  • Infracost 🌟 If you use Terraform to provision your Kubernetes clusters, you might find infracost interesting. Infracost estimates hourly and monthly costs for a Terraform project. It helps you to see the cost breakdown and compare different deployment options upfront.
  • A Guide to Cloud Cost Optimization with HashiCorp Terraform 🌟 The Terraform AWS provider now supports Code Signing for AWS Lambda, which involves digitally signing code artifacts and verifying at deployment.

Awesome Terraform

Terraform Cheat Sheets

Best Practices

Terraform and CI/CD

Terraform Boilerplates

Terraform and Kubernetes

{==

Terraform Kubernetes Boilerplates

Hashicorp Terraform Kubernetes Collection

Learnk8s Terraform and Managed Kubernetes

==}

OpenShift and Terraform

Other Boilerplates

Terraform Kubernetes Operator

{==

Terraform K3s Boilerplates

Terraform GKE Boilerplates

==}

Terraform and AWS

{==

Terraform EKS Boilerplates

==}

AWSCC. Terraform AWS Cloud Control Provider

AWS Control Tower Account Factory for Terraform (AFT)

Terraform with Azure

Terraform in Azure DevOps

{==

Terraform AKS Boilerplates

Terraform and OCI

==}

Terraform Provider for Elastic Cloud

Terraform Vault Provider

Terraform and Apache Kafka

Terraform and JMeter

Terraform Video Tutorials

CDK for Terraform

  • CDK for Terraform 🌟 CDK (Cloud Development Kit) for Terraform allows developers to use familiar programming languages to define cloud infrastructure and provision it through HashiCorp Terraform.
  • hashicorp.com: GKE Cluster Setup with CDK for Terraform Learn how to provision a Google Kubernetes Engine (GKE) cluster and prepare it for application deployment using TypeScript via CDK for Terraform.

Graph Visualization Software

Terraform Modules

Segment AWS Stack Terraform Modules

Terraform Providers

Terraform Quality Checks

Enforce Policy with Sentinel

Reverse terraform with Terraformer

  • github.com/GoogleCloudPlatform/terraformer 🌟 A CLI tool that generates tf/json and tfstate files based on existing infrastructure (reverse Terraform).
  • @ryanhos' process: "If its anything reasonably complex, my process is:"
    1. Build w/ UI
    2. Gen w/ Terraformer (local state)
    3. Fix crazy codegen-ed names
    4. Import TF, verify Cloud == State == Terraform
    5. rm -rf the manual version
    6. Recreate from TF
    7. Test and iterate w/ IaC

Terraform Tools

Terraform Frameworks

Kubestack Terraform GitOps Framework

Gruntwork Terragrunt

Terraspace

  • Terraspace.cloud Terraspace is a Terraform Framework that optimizes for infrastructure-as-code happiness. It provides an organized structure, conventions over configurations, keeps your code DRY, and adds convenient tooling. Terraspace makes working with Terraform easier and more fun.

Tweets

Click to expand!

I'm getting questions about Terraform vs Kubernetes for managing infrastructure resources.

I make the distinction by treating Terraform as a frontend tool that interacts with control planes that present **its** resources through a declarative interface. Ownership is key.

— Kelsey Hightower (@kelseyhightower) November 19, 2020
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

1/ Yesterday we released v2.1.0 of the @HashiCorp Terraform provider for @HelmPack with a cool new feature: diffs of the @kubernetesio manifests that Helm is sending to the cluster!

So, what does this look like? Let's see ...

— Phil, in the 🏜️ of Arizona (@PhilipSautter) April 2, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

This is very common. Terraform doesnt give workload portability. It gives workflow portability

By keeping the same workflow it improves adoption because it doesnt matter if your managing EC2 or Pagerduty the same lang and tools work. It lowers switching costs through workflow https://t.co/wSOZYjZMm3

— Justin Garrison (@rothgar) July 29, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Unfortunately I think this is the biggest misconception that orgs have when deciding to adopt Terraform. It's "cloud agnostic" in the same way that Python is cloud agnostic. You still need vendor specific libraries. The only thing you standardize on is syntax and workflow

— Noah Mercado (@noah_mercado) July 29, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

It's not controversial to provision resources with code. It shouldn't be controversial to deploy and manage resources with code.

— Jaana Dogan ヤナ ドガン (@rakyll) September 9, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Using Terraform with Co-pilot. pic.twitter.com/0hhbqmMGW1

— Alex Jones 🚀 (@AlexJonesax) November 8, 2021
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Yes. If its anything reasonably complex, my process is:
1.) Build w/ UI
2.) Gen w/ #Terraformer (local state)
3.) Fix crazy codegen-ed names
4.) Import TF, verify Cloud == State == #Terraform
5.) rm -rf the manual version
6.) Recreate from TF
7.) Test and iterate w/ IaC

— Ryan Hochstetler (@ryanhos) January 19, 2022
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>