diff --git a/.changelog/5155.txt b/.changelog/5155.txt new file mode 100644 index 00000000000..24d49feb84a --- /dev/null +++ b/.changelog/5155.txt @@ -0,0 +1,3 @@ +```release-note:bug +cloudbuild: marked `google_cloudbuild_trigger` as requiring one of branch_name/tag_name/commit_sha within build.source.repo_source +``` diff --git a/google/resource_cloudbuild_trigger.go b/google/resource_cloudbuild_trigger.go index e841ea673b9..c4bfdb89305 100644 --- a/google/resource_cloudbuild_trigger.go +++ b/google/resource_cloudbuild_trigger.go @@ -529,11 +529,13 @@ One of 'storageSource' or 'repoSource' must be provided.`, Description: `Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax`, + ExactlyOneOf: []string{}, }, "commit_sha": { - Type: schema.TypeString, - Optional: true, - Description: `Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.`, + Type: schema.TypeString, + Optional: true, + Description: `Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided.`, + ExactlyOneOf: []string{}, }, "dir": { Type: schema.TypeString, @@ -565,6 +567,7 @@ If omitted, the project ID requesting the build is assumed.`, Description: `Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax`, + ExactlyOneOf: []string{}, }, }, },