Skip to content

Commit

Permalink
Merge pull request #345 from Azure/hieumoscow-patch-1
Browse files Browse the repository at this point in the history
Fix Flux for public repo
  • Loading branch information
arnaudlh committed Mar 31, 2022
2 parents 9253cae + 6c4d9c2 commit a8a12df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion caf_solution/add-ons/aks_secure_baseline_v2/flux/flux.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ locals {
content : v
}
]
sync = [for v in data.kubectl_file_documents.sync.documents : {
flux_sync_yaml_without_secret = [for x in data.kubectl_file_documents.sync.documents : (length(regexall("kind: GitRepository", x)) == 0) ? x : replace(x, "/\n.*(secretRef:)\n.*(name: flux-system)/", "")]

sync = [for v in can (var.setting.secret.data) ? data.kubectl_file_documents.sync.documents : local.flux_sync_yaml_without_secret : {
data : yamldecode(v)
content : v
}
Expand All @@ -60,6 +62,7 @@ resource "kubectl_manifest" "sync" {


resource "kubernetes_secret" "fluxauth" {
count = can(var.setting.secret.data) ? 1 : 0
depends_on = [kubectl_manifest.install]

metadata {
Expand Down

0 comments on commit a8a12df

Please sign in to comment.