Company
Date Published
Author
Rosemary Wang
Word count
2153
Language
English
Hacker News points
3

Summary

The HashiCorp Terraform Operator for Kubernetes enables users to define and create infrastructure as code natively in Kubernetes, leveraging Terraform Cloud's control plane for proper handling and locking of state, sequential execution of runs, and established patterns for injecting secrets and provisioning resources. The Operator allows users to deploy a message queue that an application needs before it is deployed to Kubernetes, automating tasks to manage a set of services. It also enables the creation of custom resources internal and external to the Kubernetes cluster, capturing and automating tasks to manage a set of services. The Operator requires an account in Terraform Cloud with a free or paid Terraform Cloud organization, and uses a Team API Token for authentication. The Operator can be deployed using Helm and must be configured with sensitive variables stored as Kubernetes secrets. Once deployed, users can create a Workspace custom resource, which builds a Terraform Cloud workspace, executes a run, and updates the workspace status in Kubernetes. The Operator can also be used to update existing workspaces by applying changes to inline, non-sensitive variables and module source and version. Additionally, the Operator provides a way to delete workspaces and maintain a history of runs and the current state.