terraform-provider-google icon indicating copy to clipboard operation
terraform-provider-google copied to clipboard

Setting a cloudbuild trigger from enterprise self hosted github

Open chitha20 opened this issue 2 years ago • 7 comments

Current Problem :

Hi with the recent GA'ed of cloudbuild private github enterprise feature as mentioned here ,

we would like to leverage terraform automation in configuring the trigger for cloudbuild job from self hosted github. Current provider doc here

Right now the below terraform snippet tried to create a trigger from github which expects like this :

github.com/my-org/my-repo

And it fails for our case as we want to have capability to change the github.com towards self hosted github url.

resource "google_cloudbuild_trigger" "my-resources" {
  github {
    name  = "my-repo
    owner = "my-org"

    push {
      branch       = "^master$"
      invert_regex = false
    }
  }

  filename = "cloudbuild.yaml"
} 

Expected outcome :

We should have ability to configure the self hosted github_url in google_cloudbuild_trigger github section of the provider.

Let us know if there is a support for it already or if thats upcoming.

chitha20 avatar Sep 01 '21 09:09 chitha20

I think this is a matter of adding both a resource for https://cloud.google.com/build/docs/api/reference/rest/v1/projects.githubEnterpriseConfigs#GitHubEnterpriseConfig and the enterpriseConfigResourceName field to trigger. The API guide is confusing, and talks about creating JSON files and pushing them using curl rather than using a language client.

rileykarson avatar Sep 27 '21 16:09 rileykarson

hey folks, any update on this?

NaurisSadovskis avatar Feb 15 '22 10:02 NaurisSadovskis

Hi is anyone working on this?

nickozilla avatar Apr 05 '22 11:04 nickozilla

Hi, I have recently stumbled on this as well. Just wondering if this is being worked upon or any workarounds exist for creating the trigger for GitHub enterprise repositories?

itsavvy-ankur avatar Jul 14 '22 18:07 itsavvy-ankur

I have same issue

sebxgd avatar Sep 02 '22 14:09 sebxgd

Hi, same issue here! Any news?

ramiresdallago avatar Sep 02 '22 18:09 ramiresdallago

Working on it.

prateek2408 avatar Sep 17 '22 05:09 prateek2408