Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds enterprise_config_resource_name field to cloudbuild trigger resource in order to support github enter… #7236

Merged
merged 2 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mmv1/products/cloudbuild/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,11 @@ objects:
exactly_one_of:
- github.0.push.0.branch
- github.0.push.0.tag
- !ruby/object:Api::Type::String
name: 'enterpriseConfigResourceName'
description: |
The resource name of the github enterprise config that should be applied to this installation.
For example: "projects/{$projectId}/locations/{$locationId}/githubEnterpriseConfigs/{$configId}"
- !ruby/object:Api::Type::NestedObject
name: "bitbucketServerTriggerConfig"
description: |
Expand Down
4 changes: 4 additions & 0 deletions mmv1/products/cloudbuild/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ overrides: !ruby/object:Overrides::ResourceOverrides
- !ruby/object:Provider::Terraform::Examples
name: "cloudbuild_trigger_bitbucket_server_pull_request"
primary_resource_id: "bbs-pull-request-trigger"
- !ruby/object:Provider::Terraform::Examples
name: "cloudbuild_trigger_github_enterprise"
primary_resource_id: "ghe-trigger"
skip_test: true

properties:
id: !ruby/object:Overrides::Terraform::PropertyOverride
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "google_cloudbuild_trigger" "<%= ctx[:primary_resource_id] %>" {
name = "terraform-ghe-trigger"
location = "us-central1"

github {
owner = "hashicorp"
name = "terraform-provider-google"
push {
branch = "^main$"
}
enterprise_config_resource_name = "projects/123456789/locations/us-central1/githubEnterpriseConfigs/configID"
}

filename = "cloudbuild.yaml"
}