You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
terraform {
required_providers {
teamcity = {
source = "cvbarros/teamcity"
version = "1.0.1"
}
}
}
provider "teamcity" {
# It is strongly recommended to configure this provider through the
# environment variables described above, so that each user can have
# separate credentials set in the environment.
address = "<redacted>"
username = "<redacted>"
password = "<redacted>"
}
resource "teamcity_project" "parent" {
name = "Parent"
description = "Parent Project, will be created under the 'Root' project"
env_params = {
variable1 = "env_value1"
variable2 = "env_value2"
}
}
resource "teamcity_project" "child" {
name = "Child"
description = "Child Project, will be created under 'Parent' project"
parent_id = teamcity_project.parent.id
config_params = {
variable1 = "config_value1"
variable2 = "config_value2"
}
sys_params = {
variable1 = "system_value1"
variable2 = "system_value2"
}
}
I'm getting the following result (with debug logging):
teamcity_project.parent: Creating...
2021-07-27T16:39:51.927-0700 [INFO] Starting apply for teamcity_project.parent
2021-07-27T16:39:51.928-0700 [DEBUG] teamcity_project.parent: applying the planned Create change
2021-07-27T16:39:51.928-0700 [TRACE] GRPCProvider: ApplyResourceChange
2021-07-27T16:39:52.913-0700 [TRACE] maybeTainted: teamcity_project.parent encountered an error during creation, so it is now marked as tainted
2021-07-27T16:39:52.913-0700 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState to workingState for teamcity_project.parent
2021-07-27T16:39:52.913-0700 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState: removing state object for teamcity_project.parent
2021-07-27T16:39:52.913-0700 [TRACE] evalApplyProvisioners: teamcity_project.parent is tainted, so skipping provisioning
2021-07-27T16:39:52.913-0700 [TRACE] maybeTainted: teamcity_project.parent was already tainted, so nothing to do
2021-07-27T16:39:52.913-0700 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState to workingState for teamcity_project.parent
2021-07-27T16:39:52.913-0700 [TRACE] NodeAbstractResouceInstance.writeResourceInstanceState: removing state object for teamcity_project.parent
2021-07-27T16:39:52.913-0700 [TRACE] vertex "teamcity_project.parent": visit complete
2021-07-27T16:39:52.913-0700 [TRACE] dag/walk: upstream of "teamcity_project.child" errored, so skipping
2021-07-27T16:39:52.913-0700 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/cvbarros/teamcity\"] (close)" errored, so skipping
2021-07-27T16:39:52.913-0700 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2021-07-27T16:39:52.913-0700 [TRACE] dag/walk: upstream of "root" errored, so skipping
╷
│ Error: Error '406' when performing 'PUT' operation - project name: Responding with error, status code: 406 (Not Acceptable).
│ Make sure you have supplied correct 'Accept' header.
│
│ with teamcity_project.parent,
│ on main.tf line 20, in resource "teamcity_project" "parent":
│ 20: resource "teamcity_project" "parent" {
│
╵
Weirdly, this is actually creating the project in my Root Project on my TeamCity instance though.
Any advice would be super helpful, as I'm not sure how to debug this!
The text was updated successfully, but these errors were encountered:
My terraform looks like this:
This is basically copy pasted out of https://github.com/cvbarros/terraform-provider-teamcity/blob/master/examples/project/project.tf
I'm getting the following result (with debug logging):
Weirdly, this is actually creating the project in my Root Project on my TeamCity instance though.
Any advice would be super helpful, as I'm not sure how to debug this!
The text was updated successfully, but these errors were encountered: