Giter Site home page Giter Site logo

hashicorp / terraform-helm Goto Github PK

View Code? Open in Web Editor NEW
75.0 26.0 34.0 93 KB

Helm chart to install Terraform Cloud Operator and other associated components.

Home Page: https://learn.hashicorp.com/tutorials/terraform/kubernetes-operator?in=terraform/kubernetes

License: Mozilla Public License 2.0

Makefile 0.65% Smarty 7.91% Dockerfile 7.60% Shell 81.55% HCL 2.30%
helm-chart kubernetes operators terraform

terraform-helm's Introduction

Terraform Cloud Operator Helm Chart

This repository contains the official HashiCorp Helm chart for installing and configuring the Terraform Cloud Operator on Kubernetes. This chart supports multiple use cases of Terraform on Kubernetes depending on the values provided.

This chart is hosted on the official HashiCorp helm chart repository.

Prerequisites

To use the charts here, Helm must be installed in your Kubernetes cluster. Setting up Kubernetes and Helm and is outside the scope of this README. Please refer to the Kubernetes and Helm documentation.

The versions required are:

  • Helm +3.0.1 - This is the earliest version of Helm tested. It is possible it works with earlier versions but this chart is untested for those versions.
  • Kubernetes 1.15+ - This is the earliest version of Kubernetes tested. It is possible that this chart works with earlier versions but it is untested.

In addition to Helm, you must also have a:

  • Terraform Cloud organization - Create an organization on Terraform Cloud/Enterprise.
  • Terraform Cloud Team API Token - Generate a team API token for the Terraform Cloud organization you want to use. Make sure the team at least has privileges to manage workspaces.

Usage

Before installing the chart, you must create two Kubernetes secrets:

  1. credentials file contents with Terraform Cloud Team API token. See Terraform Cloud Configuration File Syntax for proper format.

    $ kubectl -n $NAMESPACE create secret generic terraformrc --from-file=credentials
  2. Sensitive variables for a workspace.

    $ kubectl -n $NAMESPACE create secret generic workspacesecrets --from-literal=secret_key=abc123

To use the charts, you must add the HashiCorp Helm Chart repository.

$ helm repo add hashicorp https://helm.releases.hashicorp.com
$ helm search repo hashicorp/terraform
$ helm install --namespace ${RELEASE_NAMESPACE} hashicorp/terraform --generate-name
NAME               	CHART VERSION	APP VERSION	DESCRIPTION
hashicorp/terraform	1.0  	           	Install and configure Terraform Cloud Operator ...
NAME: terraform-1589480669
LAST DEPLOYED: Thu May 14 11:24:32 2020
NAMESPACE: operator
STATUS: deployed
REVISION: 1
NOTES:
Thank you for installing HashiCorp Terraform Cloud Operator!

Now that you have deployed HashiCorp Terraform Cloud Operator, you should look over the docs on using
Terraform with Kubernetes available here:

https://github.com/hashicorp/terraform-k8s/blob/master/README.md


Your release is named terraform-1589480669. To learn more about the release, try:

  $ helm status terraform-1589480669
  $ helm get terraform-1589480669

Please see the many options supported in the values.yaml file.

To create a Terraform workspace, you can create a separate Helm chart to deploy the custom resource or examine the example under example/. Helm does not currently support a wait function before deletion, which will cause custom resources to remain behind.

Note that the Helm chart automatically installs all Custom Resource Definitions under the crds/ directory. As a result, any updates to the schema must be manually copied into the directory and removed from the Kubernetes cluster:

$ kubectl delete crd workspaces.app.terraform.io

If the CRD is not updated correctly, you will not be able to create a Workspace Custom Resource.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.