cvbarros / terraform-provider-teamcity

Terraform Provider for Jetbrains TeamCity CI server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing items should be re-applied

davidhiebert opened this issue · comments

Expected Behavior:

A TeamCity GUI user deletes a resource. Terraform should re-apply the resource.

Actual Behavior:

When an item is deleted from TeamCity, and terraform apply is run, a 404 error is returned and TF closes with non-zero.

$ terraform apply
teamcity_project.web_artifacts: Refreshing state... [id=WebArtifacts]
teamcity_vcs_root_git.vcsroot["ccws"]: Refreshing state... [id=WebArtifacts_Api]

Error: Error when retrieving VcsRoot id = 'WebArtifacts_Api', status: 404

Workaround

terraform state rm teamcity_vcs_root_git.vcsroot["api"]
terraform apply