cvbarros / terraform-provider-teamcity

Terraform Provider for Jetbrains TeamCity CI server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

teamcity_vcs_root_git Resource - Agent settings not working

MattHodge opened this issue · comments

Given the following resource:

resource "teamcity_vcs_root_git" "project_vcs_root" {
  name       = "Application"
  project_id = "${teamcity_project.project.id}"

  fetch_url = "https://github.com/XXXX/${var.github_repository}"

  default_branch = "master"
  branches       = ["+:refs/(pull/*)/head"]

  agent {
    clean_policy       = "branch_change"
    use_mirrors        = true
  }

  username_style = "author_email"

  auth {
    type     = "userpass"
    username = "${var.github_username}"
    password = "${var.github_password}"
  }
}

When this is posted to the TeamCity API, a VCS Root is created, but when viewing the VCS Root via the TeamCity REST API, it shows the following:

<property name="agentCleanPolicy" value="branch_change"/>

where it should show

<property name="agentCleanPolicy" value="ON_BRANCH_CHANGE"/>

This causes builds to fail to be run.