Skip to content

Commit e7acb02

Browse files
Marked exactly_one_of for cloudbuild trigger repoSource tag/branch/commit (#5155) (#3582)
Signed-off-by: Modular Magician <[email protected]>
1 parent 45a5d3c commit e7acb02

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.changelog/5155.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
cloudbuild: marked `google_cloudbuild_trigger` as requiring one of branch_name/tag_name/commit_sha within build.source.repo_source
3+
```

google-beta/resource_cloudbuild_trigger.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,13 @@ One of 'storageSource' or 'repoSource' must be provided.`,
529529
Description: `Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided.
530530
The syntax of the regular expressions accepted is the syntax accepted by RE2 and
531531
described at https://github.com/google/re2/wiki/Syntax`,
532+
ExactlyOneOf: []string{},
532533
},
533534
"commit_sha": {
534-
Type: schema.TypeString,
535-
Optional: true,
536-
Description: `Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.`,
535+
Type: schema.TypeString,
536+
Optional: true,
537+
Description: `Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.`,
538+
ExactlyOneOf: []string{},
537539
},
538540
"dir": {
539541
Type: schema.TypeString,
@@ -565,6 +567,7 @@ If omitted, the project ID requesting the build is assumed.`,
565567
Description: `Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided.
566568
The syntax of the regular expressions accepted is the syntax accepted by RE2 and
567569
described at https://github.com/google/re2/wiki/Syntax`,
570+
ExactlyOneOf: []string{},
568571
},
569572
},
570573
},

google-beta/resource_dataproc_cluster_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ import (
1313
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
1414
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
1515

16-
dataproc "google.golang.org/api/dataproc/v1beta2"
1716
"google.golang.org/api/googleapi"
17+
18+
dataproc "google.golang.org/api/dataproc/v1beta2"
1819
)
1920

2021
func TestDataprocExtractInitTimeout(t *testing.T) {

0 commit comments

Comments
 (0)