fluxcd / terraform-provider-flux

Terraform and OpenTofu provider for bootstrapping Flux

Home Page:https://registry.terraform.io/providers/fluxcd/flux/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

` flux_bootstrap_git` protected branch hook declined error

BurakCetin3129 opened this issue · comments

I'm working on to migrate from the old datasource method to the new resource method by following the guide here.

We are using branch protection in Github repo main branch.
flux_bootstrap_git tries to push provider managed repository_files to main branch during terraform apply.
And creates this error:

Error: Unable to push updated files
│ 
│   with flux_bootstrap_git.this,
│   on fluxcd.tf line 32, in resource "flux_bootstrap_git" "this":
│   32: resource "flux_bootstrap_git" "this" {
│ 
│ command error on refs/heads/desired_state: protected branch hook declined

I don't want to disable branch protection on it.
How can we overcome this issue?

temporary disabling branch protection seems as the only way.