Skip to content

Commit 23912e4

Browse files
authored
Merge pull request #452 from fluxcd/terraform-provider
Add the Terraform provider to install docs
2 parents 5ea7aa0 + 17468cb commit 23912e4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/guides/installation.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,32 @@ git add -A && git commit -m "update flux" && git push
343343
The source-controller will pull the changes on the cluster, then the kustomize-controller
344344
will perform a rolling update of all Flux components including itself.
345345

346+
## Bootstrap with Terraform
347+
348+
The bootstrap procedure can be implemented with Terraform using the Flux provider published on
349+
[registry.terraform.io](https://registry.terraform.io/providers/fluxcd/flux).
350+
351+
The provider consists of two data sources (`flux_install` and `flux_sync`) for generating the
352+
Kubernetes manifests that can be used to install or upgrade Flux:
353+
354+
```hcl
355+
data "flux_install" "main" {
356+
target_path = "clusters/my-cluster"
357+
arch = "amd64"
358+
network_policy = false
359+
version = "latest"
360+
}
361+
362+
data "flux_sync" "main" {
363+
target_path = "clusters/my-cluster"
364+
url = "https://github.com/${var.github_owner}/${var.repository_name}"
365+
branch = "main"
366+
}
367+
```
368+
369+
For more details on how to use the Terraform provider
370+
please see [fluxcd/terraform-provider-flux](https://github.com/fluxcd/terraform-provider-flux).
371+
346372
## Customize Flux manifests
347373

348374
You can customize the Flux components in the Git repository where you've run bootstrap with Kustomize patches.

0 commit comments

Comments
 (0)