diff --git a/modules/azuredevops/GitHub-Build-Definition-Pull-Request-Trigger/github_build_definition_pull_request_trigger.tf b/modules/azuredevops/GitHub-Build-Definition-Pull-Request-Trigger/github_build_definition_pull_request_trigger.tf index 83bfd8b8..620dcaed 100644 --- a/modules/azuredevops/GitHub-Build-Definition-Pull-Request-Trigger/github_build_definition_pull_request_trigger.tf +++ b/modules/azuredevops/GitHub-Build-Definition-Pull-Request-Trigger/github_build_definition_pull_request_trigger.tf @@ -14,6 +14,7 @@ resource "azuredevops_build_definition" "devops_build_definition" { name = var.build_definition_name path = var.pipeline_path agent_pool_name = var.agent_pool_name + queue_status = var.status ci_trigger { use_yaml = true diff --git a/modules/azuredevops/GitHub-Build-Definition-Pull-Request-Trigger/variables.tf b/modules/azuredevops/GitHub-Build-Definition-Pull-Request-Trigger/variables.tf index 3cd43209..561e8852 100644 --- a/modules/azuredevops/GitHub-Build-Definition-Pull-Request-Trigger/variables.tf +++ b/modules/azuredevops/GitHub-Build-Definition-Pull-Request-Trigger/variables.tf @@ -85,3 +85,9 @@ variable "repo_type" { description = "The type of the repository." type = string } + +variable "status" { + default = "enabled" + description = "The queue status of the build definition. Valid values: enabled or paused or disabled" + type = string +} diff --git a/modules/azuredevops/GitHub-Build-Definition/github_build_definition.tf b/modules/azuredevops/GitHub-Build-Definition/github_build_definition.tf index 16172d98..9422ac41 100644 --- a/modules/azuredevops/GitHub-Build-Definition/github_build_definition.tf +++ b/modules/azuredevops/GitHub-Build-Definition/github_build_definition.tf @@ -14,6 +14,7 @@ resource "azuredevops_build_definition" "devops_build_definition" { name = var.build_definition_name agent_pool_name = var.agent_pool_name path = var.pipeline_path + queue_status = var.status ci_trigger { use_yaml = true diff --git a/modules/azuredevops/GitHub-Build-Definition/variables.tf b/modules/azuredevops/GitHub-Build-Definition/variables.tf index 624b2fdb..0299c8ee 100644 --- a/modules/azuredevops/GitHub-Build-Definition/variables.tf +++ b/modules/azuredevops/GitHub-Build-Definition/variables.tf @@ -61,3 +61,9 @@ variable "repo_type" { description = "The type of the repository." type = string } + +variable "status" { + default = "enabled" + description = "The queue status of the build definition. Valid values: enabled or paused or disabled" + type = string +}