MCPcopy Index your code
hub / github.com/danisla/terraform-operator

github.com/danisla/terraform-operator @0.3.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.3.7 ↗ · + Follow
78 symbols 186 edges 17 files 28 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Terraform Operator

This is not an official Google product.

Intro

Implementation of a CompositeController metacontroller to operate the Terraform lifecycle.

This controller utilizes the following major components: - Custom Resource Definitions (CRD): Used to represent the new custom resources. - metacontroller: Implements the CompositeController interface for the Custom Resource Definition.

Prerequisites

  1. Create GKE cluster:
ZONE=us-central1-b
CLUSTER_VERSION=$(gcloud beta container get-server-config --zone ${ZONE} --format='value(validMasterVersions[0])')

gcloud container clusters create dev \
  --cluster-version ${CLUSTER_VERSION} \
  --machine-type n1-standard-4 \
  --num-nodes 3 \
  --scopes=cloud-platform \
  --zone ${ZONE}

Install metacontroller

  1. Install metacontroller:
kubectl create clusterrolebinding ${USER}-cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud config get-value account)

kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/metacontroller/master/manifests/metacontroller-rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/metacontroller/master/manifests/metacontroller.yaml

Install the operator

  1. Deploy the manifest files for the operator:
kubectl apply -f manifests/terraform-operator-rbac.yaml
kubectl apply -f manifests/terraform-operator.yaml

Core symbols most depended-on inside this repo

myLog
called by 45
cmd/terraform-operator/main.go
getTerraform
called by 6
cmd/terraform-operator/stateTFInputPending.go
toSha1
called by 5
cmd/terraform-operator/status.go
getVarsFromTF
called by 4
cmd/terraform-operator/stateTFVarsFromPending.go
getConfigMapSourceData
called by 4
cmd/terraform-operator/stateSourcePending.go
insert
called by 4
images/tfjson-service/cmd/tfjson-service/main.go
makeTerraformPod
called by 3
cmd/terraform-operator/terraformPod.go
calcParentSig
called by 3
cmd/terraform-operator/status.go

Shape

Function 42
Struct 19
TypeAlias 9
Method 8

Languages

Go100%

Modules by API surface

pkg/types/types.go18 symbols
cmd/terraform-operator/terraformPod.go13 symbols
images/tfjson-service/cmd/tfjson-service/main.go7 symbols
cmd/terraform-operator/types.go7 symbols
cmd/terraform-operator/statePodRunning.go5 symbols
cmd/terraform-operator/main.go5 symbols
cmd/terraform-operator/status.go4 symbols
cmd/terraform-operator/util.go3 symbols
cmd/terraform-operator/stateSourcePending.go3 symbols
cmd/terraform-operator/stateTFVarsFromPending.go2 symbols
cmd/terraform-operator/stateTFInputPending.go2 symbols
cmd/terraform-operator/stateRetry.go2 symbols

For agents

$ claude mcp add terraform-operator \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page