File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
modules/azuredevops/GitHub-Build-Definition Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,24 @@ resource "azuredevops_build_definition" "devops_build_definition" {
1717 queue_status = var. status
1818
1919 ci_trigger {
20- use_yaml = true
20+ use_yaml = var. use_yaml == true ? true : null
21+
22+ dynamic "override" {
23+ for_each = var. use_yaml == false ? var. ci_trigger_overrides : []
24+ content {
25+ batch = override. value . batch
26+ max_concurrent_builds_per_branch = override. value . max_concurrent_builds_per_branch
27+ polling_interval = override. value . polling_interval
28+ branch_filter {
29+ exclude = override. value . branch_filter_exclude_list
30+ include = override. value . branch_filter_include_list
31+ }
32+ path_filter {
33+ exclude = override. value . path_filter_exclude_list
34+ include = override. value . path_filter_include_list
35+ }
36+ }
37+ }
2138 }
2239
2340 repository {
Original file line number Diff line number Diff line change @@ -67,3 +67,23 @@ variable "status" {
6767 description = " The queue status of the build definition. Valid values: enabled or paused or disabled"
6868 type = string
6969}
70+
71+ variable "use_yaml" {
72+ default = true
73+ description = " Use YAML for CI trigger"
74+ type = bool
75+ }
76+
77+ variable "ci_trigger_overrides" {
78+ default = []
79+ description = " Overrides for the CI trigger. Only used when use_yaml is false."
80+ type = list (object ({
81+ batch = bool
82+ max_concurrent_builds_per_branch = number
83+ polling_interval = number
84+ branch_filter_exclude_list = list (string )
85+ branch_filter_include_list = list (string )
86+ path_filter_exclude_list = list (string )
87+ path_filter_include_list = list (string )
88+ }))
89+ }
You can’t perform that action at this time.
0 commit comments