-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflux.tf
25 lines (22 loc) · 885 Bytes
/
flux.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
resource "tls_private_key" "git-main" {
algorithm = "ECDSA"
ecdsa_curve = "P256"
}
resource "github_repository_deploy_key" "main" {
title = "hcloud-${var.cluster_name}"
repository = var.github_repository_name
key = tls_private_key.git-main.public_key_openssh
read_only = false
}
resource "flux_bootstrap_git" "main" {
embedded_manifests = true
network_policy = true
components = var.flux_components
components_extra = var.flux_components_extra
namespace = var.flux_namespace
registry = var.flux_registry
version = var.flux_version
image_pull_secret = var.flux_image_pull_secret
path = try(length(var.flux_repo_target_path), 0) > 0 ? var.flux_repo_target_path : "clusters/hcloud-${var.cluster_name}"
depends_on = [github_repository_deploy_key.main, rancher2_cluster.hetzner]
}