Skip to content

Commit

Permalink
Add overrride on create option to github repository files (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
phillebaba authored Dec 9, 2020
1 parent 15b8b26 commit 1b8e515
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions modules/kubernetes/fluxcd-v2-github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,27 @@ resource "github_repository_deploy_key" "cluster" {
}

resource "github_repository_file" "install" {
repository = data.github_repository.cluster.name
branch = var.branch
file = data.flux_install.this.path
content = data.flux_install.this.content
repository = data.github_repository.cluster.name
branch = var.branch
file = data.flux_install.this.path
content = data.flux_install.this.content
overwrite_on_create = true
}

resource "github_repository_file" "sync" {
repository = data.github_repository.cluster.name
branch = var.branch
file = data.flux_sync.this.path
content = data.flux_sync.this.content
repository = data.github_repository.cluster.name
branch = var.branch
file = data.flux_sync.this.path
content = data.flux_sync.this.content
overwrite_on_create = true
}

resource "github_repository_file" "kustomize" {
repository = data.github_repository.cluster.name
branch = var.branch
file = data.flux_sync.this.kustomize_path
content = data.flux_sync.this.kustomize_content
repository = data.github_repository.cluster.name
branch = var.branch
file = data.flux_sync.this.kustomize_path
content = data.flux_sync.this.kustomize_content
overwrite_on_create = true
}

data "kubectl_file_documents" "install" {
Expand Down Expand Up @@ -227,4 +230,5 @@ resource "github_repository_file" "tenant" {
name = each.key,
environment = var.environment,
})
overwrite_on_create = true
}

0 comments on commit 1b8e515

Please sign in to comment.