Jump to content

Extending GitOps Beyond Kubernetes with Terraform Controller


Recommended Posts

Organizations rely on numerous solutions apart from Kubernetes to assist in their cloud-native journey. One prominent tool used to provision and manage resources in the cloud is Terraform. However, there are numerous challenges to managing Terraform that can be addressed by Weave GitOps’ Terraform Controller.

What is Weave GitOps Terraform Controller?

Weave GitOps Terraform Controller is an operator pattern controller that manages Terraform resources, the GitOps way. It’s responsible for validating, planning, and applying Terraform descriptions of cloud resources.

The Terraform-managed cloud resources are then managed entirely through their lifecycle via a GitOps constant reconciliation loop. This can be done by following the steps below:

  1. Create HCL (Hashicorp Configuration Language) templates to be merged with a Kubernetes Custom Resource to produce valid Terraform HCL code.
  2. Commit the output HCL to Git to facilitate other mechanisms like the Flux Terraform Controller.
  3. Reuse the templates to deploy multiple instances with different specifics.

With the Terraform Controller, any of the Terraform modules are part of the GitOps flow. You can configure resources on any cloud (AWS, Azure, Google, etc), and different parts of the software stack including databases, networking, and security. The Terraform resources are continuously reconciled so that any drifts in the runtime away from the deployed resource will be alerted.

With Terraform Controller, you can:

  • Use the Terraform Controller to create a managed database in AWS (during a GitOps application deployment).
  • Detect drift in the runtime environment from the desired state (the plan) for any Terraform resource.
  • Automate parts of your existing infrastructure resources using GitOps. For example, if you have an existing EKS cluster, you can choose to automate only its nodegroup, or its security group.

To learn more about the Terraform Controller, check out the documentation for a list of features and use cases. If you’re ready to GitOps your Terraform resources with the Terraform controller, this guide can help you get started.

View the full article

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...