You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+13-29
Original file line number
Diff line number
Diff line change
@@ -16,49 +16,33 @@ TF-controller offers many GitOps models:
16
16
17
17
## Quickstart and documentation
18
18
19
-
To get started check out this [guide](https://docs.gitops.weave.works/docs/terraform/get-started/) on how to GitOps your Terraform resources with TF-controller and Flux.
19
+
To get started check out this [guide](https://weaveworks.github.io/tf-controller/getting_started/) on how to GitOps your Terraform resources with TF-controller and Flux.
20
20
21
-
Check out the [documentation](https://docs.gitops.weave.works/docs/terraform/overview/) for a list of [features](https://docs.gitops.weave.works/docs/terraform/overview/#features)and [use cases](https://docs.gitops.weave.works/docs/terraform/Using%20Terraform%20CRD/provision/).
21
+
Check out the [documentation](https://weaveworks.github.io/tf-controller/)and [use cases](https://weaveworks.github.io/tf-controller/use_tf_controller/).
22
22
23
23
## Roadmap
24
24
25
-
### Q3 2022
26
-
*[x] Performance
27
-
*[x] Scalability
28
-
*[x] Interop with Notification controller's Events and Alert
29
-
*[x] Validation webhooks for the planning stage
30
-
31
-
### Q4 2022
32
-
*[x]~~CRD wrappers~~ A new component model for Terraform modules
33
-
*[x] Dependency management for TF-controller objects
34
-
*[x] AWS package for TF-controller (e.g. EKS, RDS, etc.)
35
-
*[x] CLI for Weave GitOps
36
-
37
-
### Q1 2023
38
-
*[x]`v1alpha2` API
39
-
*[x] Flux v2.0.0-rc support
40
-
*[x] Better Terraform Cloud integration
41
-
42
25
### Q2 2023
43
-
*[ ] Write back and show plan in PRs (Atlantis-like experience)
44
-
*[ ] Type safety for custom backends
45
-
*[ ] Selectable Terraform versions
26
+
*[x] Selectable Terraform versions
46
27
*[ ] Flux v2.0.0 GA support
47
-
*[ ] Break-the-glass feature
28
+
*[x] Break-the-glass feature
29
+
*[ ] Enhanced security (the lockdown mode)
30
+
*[x] Containerd compatibility verification
48
31
49
32
### Q3 2023
50
-
*[ ]`v1beta1` API (stabilization)
51
-
*[ ]Observability - logging from the different stages of the runner
52
-
*[ ]CLI to GitOpsify existing Terraform workflows
53
-
*[ ]Enhanced security (the lockdown mode)
33
+
*[ ]Write back and show plan in PRs (Atlantis-like experience)
34
+
*[ ]CLI to GitOpsify existing Terraform workflows (UX improvement for CLI)
35
+
*[ ]Type safety for custom backends
36
+
*[ ]Improvement GitOps dependency management
54
37
*[ ] External drift detector
55
-
*[ ] Cloud cost estimation
38
+
*[ ] Cloud cost estimation
56
39
57
40
### Q4 2023
41
+
*[ ] Observability - logging from the different stages of the runner
42
+
*[ ]`v1beta1` API (stabilization)
58
43
*[ ] Azure package for TF-controller (e.g. AKS, CosmosDB, etc.)
59
44
*[ ] GCP package for TF-controller (e.g. GKE, CloudSQL, etc.)
Copy file name to clipboardexpand all lines: docs/getting_started.md
+6-5
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,17 @@
4
4
5
5
Here are the requirements you need to set up before you start:
6
6
7
-
1. Flux v0.32.0 or later (not only the CLI, but also the controllers on the cluster). If you are not sure about the Flux version on your cluster, please re-bootstrap your cluster.
8
-
2. TF-controller uses **the Controller/Runner architecture**. The Controller acts as a client, and talks to each Runner's Pod via gRPC. Please make sure
7
+
1. For Terraform Controller **v0.15+**, it requires **Flux v2.0** or later (not only the CLI, but also the controllers on the cluster). If you are not sure about the Flux version on your cluster, please re-bootstrap your cluster.
8
+
2. For Terraform Controller v0.13 and v0.14, Flux 2 v0.32 - v0.41 (of course, not only the CLI, but also the controllers on the cluster).
9
+
3. TF-controller uses **the Controller/Runner architecture**. The Controller acts as a client, and talks to each Runner's Pod via gRPC. Please make sure
9
10
1.**Each Runner's Pod in each Namespace** is allowed to open, and serve at **port 30000** (the gRPC port of a Runner), and the Controller can connect to it.
10
11
2.**The Controller** needs to download tar.gz BLOBs from the **Source controller** via **port 80**.
11
12
3.**The Controller** needs to post the events to the **Notification controller** via **port 80**.
12
13
13
14
## Installation
14
15
15
16
Before using TF-controller, you have to install Flux by using either `flux install` or `flux bootstrap` command.
16
-
Please note that TF-controller now requires **Flux v0.32.0** or later, so please make sure you have the latest version of Flux.
17
+
Please note that TF-controller now requires **Flux v2.0** or later, so please make sure you have the latest version of Flux.
17
18
After that you can install TF-controller with Flux HelmRelease by:
18
19
19
20
```shell
@@ -43,7 +44,7 @@ please see [chart readme](https://github.com/weaveworks/tf-controller/tree/main/
43
44
Alternatively, you can install TF-controller via `kubectl`:
"Break the glass" refers to a troubleshooting mode specifically designed
6
+
to provide a manual solution when the Terraform controller (TF-controller)
7
+
is not performing as expected. There are two primary methods of initiating this mode:
8
+
9
+
1. Using the `tfctl` command-line tool.
10
+
2. Setting the `spec.breakTheGlass` field to `true` in the Terraform object.
11
+
12
+
## Using `tfctl` to Break the Glass
13
+
14
+
To start a one-time troubleshooting session, you can use the `tfctl break-glass` command. For instance:
15
+
16
+
```shell
17
+
tfctl break-glass hello-world
18
+
```
19
+
20
+
This command initiates a session that allows you to execute any Terraform command
21
+
to rectify the issues with your Terraform resources. It is noteworthy that this command
22
+
does not require setting the `spec.breakTheGlass` field to `true` in the Terraform object.
23
+
24
+
After resolving the issues, you can simply exit the shell.
25
+
GitOps will then continue to reconcile the Terraform object.
26
+
27
+
## Break the glass with `spec.breakTheGlass` field
28
+
29
+
This feature is particularly useful for troubleshooting Terraform objects at their initialization stage or in situations with unexpected errors.
30
+
It is generally not recommended to use this mode routinely for fixing Terraform resources.
31
+
32
+
You can enable the 'Break the Glass' feature for every reconciliation by setting the `breakTheGlass` field to `true` in the `spec` of the Terraform object.
Copy file name to clipboardexpand all lines: docs/tfctl.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,13 @@
4
4
5
5
## Installation
6
6
7
-
You can download the `tfctl` binary via the GitHub releases page: [https://github.com/weaveworks/tf-controller/releases](https://github.com/weaveworks/tf-controller/releases)
7
+
To install `tfctl` via Homebrew, run the following command:
8
+
9
+
```shell
10
+
brew install weaveworks/tap/tfctl
11
+
```
12
+
13
+
You can also download the `tfctl` binary via the GitHub releases page: [https://github.com/weaveworks/tf-controller/releases](https://github.com/weaveworks/tf-controller/releases).
Copy file name to clipboardexpand all lines: docs/use_tf_controller/index.md
+1
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@
12
12
-[Use TF-controller to provision Terraform resources that are required **health checks**](to_provision_Terraform_resources_that_are_required_health_checks.md)
13
13
-[Use TF-controller to provision resources and **destroy them when the Terraform object gets deleted**](to_provision_resources_and_destroy_them_when_the_Terraform_object_gets_deleted.md)
14
14
-[Use TF-controller to **force unlock** Terraform states](to_force_unlock_Terraform_states.md)
15
+
-[Use TF-controller with Terraform Runners enabled via Env Variables](with_tf_runner_logging.md)
15
16
-[Use TF-controller to provision resources with **customized Runner Pods**](to_provision_resources_with_customized_Runner_Pods.md)
16
17
-[Use TF-controller with **Terraform Enterprise**](with_Terraform_Enterprise.md)
17
18
-[Use TF-controller with **primitive modules**](with_primitive_modules.md)
Copy file name to clipboardexpand all lines: docs/use_tf_controller/to_detect_drifts_only_without_plan_or_apply.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
We can set `.spec.approvePlan` to `disable` to tell the controller to detect drifts of your Terraform resources only. Doing so will skip the `plan` and `apply` stages.
Copy file name to clipboardexpand all lines: docs/use_tf_controller/to_provision_Terraform_resources_that_are_required_health_checks.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ We can use standard Go template expressions, like `${{ .rdsAddress }}`, to refer
25
25
We support two types of health checks, `tcp` amd `http`. The `tcp` type allows us to verify a TCP connection, while the `http` type is for verify an HTTP URL. The default timeout of each health check is 20 seconds.
Copy file name to clipboardexpand all lines: docs/use_tf_controller/to_provision_resources_and_obtain_outputs.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Outputs created by Terraform can be written to a secret using `.spec.writeOutput
7
7
We can specify a target secret in `.spec.writeOutputsToSecret.name`, and the controller will write all outputs to the secret by default.
8
8
9
9
```yaml hl_lines="14-15"
10
-
apiVersion: infra.contrib.fluxcd.io/v1alpha1
10
+
apiVersion: infra.contrib.fluxcd.io/v1alpha2
11
11
kind: Terraform
12
12
metadata:
13
13
name: helloworld
@@ -29,7 +29,7 @@ spec:
29
29
We can choose only a subset of outputs by specify output names we'd like to write in the `.spec.writeOutputsToSecret.outputs` array.
30
30
31
31
```yaml hl_lines="16-18"
32
-
apiVersion: infra.contrib.fluxcd.io/v1alpha1
32
+
apiVersion: infra.contrib.fluxcd.io/v1alpha2
33
33
kind: Terraform
34
34
metadata:
35
35
name: helloworld
@@ -59,7 +59,7 @@ TF-controller supports mapping output name using the `old_name:new_name` format.
59
59
In the following example, we renamed `age_key` output as `age.agekey` entry for the `helloworld-output` Secret's data, so that other components in the GitOps pipeline could consume it.
60
60
61
61
```yaml hl_lines="16-17"
62
-
apiVersion: infra.contrib.fluxcd.io/v1alpha1
62
+
apiVersion: infra.contrib.fluxcd.io/v1alpha2
63
63
kind: Terraform
64
64
metadata:
65
65
name: helloworld
@@ -84,7 +84,7 @@ As an example, operators such as [kubernetes-replicator](https://github.com/mitt
84
84
allow replicating secrets from one namespace to another but use annotations to do so.
Copy file name to clipboardexpand all lines: docs/use_tf_controller/to_provision_resources_with_customized_Runner_Pods.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ For example, for Azure AKS to grant pod active directory permissions using Azure
7
7
a label like `aadpodidbinding: myIdentity` on the pod is required.
8
8
9
9
```yaml
10
-
apiVersion: infra.contrib.fluxcd.io/v1alpha1
10
+
apiVersion: infra.contrib.fluxcd.io/v1alpha2
11
11
kind: Terraform
12
12
metadata:
13
13
name: helloworld
@@ -33,7 +33,7 @@ spec:
33
33
By default, the Terraform controller uses `RUNNER_POD_IMAGE` environment variable to identify the Runner Pod's image to use. You can customize the image on the global level by updating the value of the environment variable or, you can specify an image to use per Terraform object for its reconciliation.
34
34
35
35
```yaml
36
-
apiVersion: infra.contrib.fluxcd.io/v1alpha1
36
+
apiVersion: infra.contrib.fluxcd.io/v1alpha2
37
37
kind: Terraform
38
38
metadata:
39
39
name: helloworld
@@ -56,4 +56,4 @@ You can use [`runner.Dockerfile`](https://github.com/weaveworks/tf-controller/bl
56
56
## Customize Runner Pod Specifications
57
57
58
58
You can also customize various Runner Pod `spec` fields to control and configure how the Runner Pod runs.
59
-
For example, you can configure Runner Pod `spec` affinity and tolerations if you need to run in on a specific set of nodes. Please see [RunnerPodSpec](https://weaveworks.github.io/tf-controller/References/terraform/#infra.contrib.fluxcd.io/v1alpha1.RunnerPodSpec) for a list of the configurable Runner Pod `spec` fields.
59
+
For example, you can configure Runner Pod `spec` affinity and tolerations if you need to run in on a specific set of nodes. Please see [RunnerPodSpec](https://weaveworks.github.io/tf-controller/References/terraform/#infra.contrib.fluxcd.io/v1alpha2.RunnerPodSpec) for a list of the configurable Runner Pod `spec` fields.
Copy file name to clipboardexpand all lines: docs/use_tf_controller/with_a_custom_backend.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ The tfstate is stored in a secret named: `tfstate-${workspace}-${secretSuffix}`.
7
7
If you wish to use a custom backend, you can configure it by defining the `.spec.backendConfig.customConfiguration` with one of the backends such as **GCS** or **S3**, for example:
0 commit comments