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
As seen in the log, the first template is successfully modified, but the other two fail.
If I run terraform plan && terraform apply again, the next template is okay and only one is failed.
If I run it again afterwards, all succeed. It seems that there can be only be one modify at the same time?
Template definition
resource"coderd_template""templates" {
for_each=local.templatesname=each.value.namedescription=each.value.descriptionicon=each.value.icondefault_ttl_ms=7200000versions=[
{
name = data.external.current_commit[each.key].result.commit
message = data.external.current_commit[each.key].result.message
directory ="./template"
active =true
tf_vars =concat(local.default_vars, [
{
name ="ado_projects"
value =jsonencode(each.value.ado_projects)
},
{
name ="default_ado_project"
value = each.value.default_ado_project
},
{
name ="image_variants"
value =jsonencode(each.value.image_variants)
},
{
name ="default_image_variant"
value = each.value.default_image_variant
},
{
name ="repository"
value = each.value.image_repository
},
{
name ="bash_aliases"
value =jsonencode(each.value.bash_aliases)
}
])
}
]
}
Planned changes
Terraform will perform the following actions:
# coderd_template.templates["debian"] will be updated in-place
~ resource "coderd_template" "templates" {
~ display_name = "debian" -> (known after apply)
id = "5655ead2-2e39-477b-b944-9e8073d32ba8"
~ max_port_share_level = "public" -> (known after apply)
name = "debian"
~ organization_id = "<REDACTED>" -> (known after apply)
~ versions = [
~ {
~ id = "e8bb03e4-d363-435f-9358-c0404b111edc" -> (known after apply)
~ message = "Merged PR 17172: fix: spaces in alias and alias read #40634" -> "Merged PR 17174: fix: defaults #40644"
~ name = "4d1ac972b5f9bb934f1e15ebef0536ffa24d2220" -> "8da2d897e1d9c8422f10d41bb6088a564ee9c4df"
~ tf_vars = [
- {
- name = "ado_projects" -> null
- value = jsonencode(
{
- Debian-Project-1 = {
- image_variant = "bullseye"
- repository = "Debian-Project-1"
}
- Debian-Project-2 = {
- image_variant = "bullseye"
- repository = "Debian-Project-2"
}
}
) -> null
},
+ {
+ name = "ado_projects"
+ value = jsonencode(
{
+ Debian-Project-1 = {
+ image_variant = "Default"
+ repository = "Debian-Project-1"
}
+ Debian-Project-2 = {
+ image_variant = "Default"
+ repository = "Debian-Project-2"
}
}
)
},
# (9 unchanged elements hidden)
]
# (3 unchanged attributes hidden)
},
]
# (14 unchanged attributes hidden)
}
# coderd_template.templates["kubernetes"] will be updated in-place
~ resource "coderd_template" "templates" {
~ display_name = "kubernetes" -> (known after apply)
id = "24f0a052-c445-42d1-a220-76394b0d2340"
~ max_port_share_level = "public" -> (known after apply)
name = "kubernetes"
~ organization_id = "<REDACTED>" -> (known after apply)
~ versions = [
~ {
~ id = "10d894a4-c968-41ae-80a8-64bce744a72e" -> (known after apply)
~ message = "Merged PR 17172: fix: spaces in alias and alias read #40634" -> "Merged PR 17174: fix: defaults #40644"
~ name = "4d1ac972b5f9bb934f1e15ebef0536ffa24d2220" -> "8da2d897e1d9c8422f10d41bb6088a564ee9c4df"
~ tf_vars = [
- {
- name = "ado_projects" -> null
- value = jsonencode(
{
- Gitops-Project = {
- image_variant = "bullseye"
- repository = "Gitops-Project"
}
}
) -> null
},
+ {
+ name = "ado_projects"
+ value = jsonencode(
{
+ Gitops-Project = {
+ image_variant = "Default"
+ repository = "Gitops-Project"
}
}
)
},
# (9 unchanged elements hidden)
]
# (3 unchanged attributes hidden)
},
]
# (14 unchanged attributes hidden)
}
# coderd_template.templates["powershell"] will be updated in-place
~ resource "coderd_template" "templates" {
~ display_name = "powershell" -> (known after apply)
id = "4022a9b8-ce13-41d8-ab4f-11bcc8f906a7"
~ max_port_share_level = "public" -> (known after apply)
name = "powershell"
~ organization_id = "<REDACTED>" -> (known after apply)
~ versions = [
~ {
~ id = "24c31fc8-d197-476a-92d7-378b25bfb9b7" -> (known after apply)
~ message = "Merged PR 17172: fix: spaces in alias and alias read #40634" -> "Merged PR 17174: fix: defaults #40644"
~ name = "4d1ac972b5f9bb934f1e15ebef0536ffa24d2220" -> "8da2d897e1d9c8422f10d41bb6088a564ee9c4df"
~ tf_vars = [
- {
- name = "ado_projects" -> null
- value = jsonencode(
{
- PS-Project-1 = {
- image_variant = "default"
- repository = "PS-Project-1"
}
- PS-Project-2 = {
- image_variant = "default"
- repository = "PS-Project-2"
}
}
) -> null
},
+ {
+ name = "ado_projects"
+ value = jsonencode(
{
+ PS-Project-1 = {
+ image_variant = "Default"
+ repository = "PS-Project-1"
}
+ PS-Project-2 = {
+ image_variant = "Default"
+ repository = "PS-Project-2"
}
}
)
},
# (9 unchanged elements hidden)
]
# (3 unchanged attributes hidden)
},
]
# (14 unchanged attributes hidden)
}
Plan: 0 to add, 3 to change, 0 to destroy.
Edit: Added the plan and collapsed template
Edit Edit: Added timestamps to the log
The text was updated successfully, but these errors were encountered:
Moving this to coder/coder as it sounds reproducible without the provider. Though I won't rule out the possibility of making provider changes to accommodate for it, if we need to.
I think it occured in context of the provider as in this case it sends three simultanous requests to the API. But I agree, it is most likely an issue with the API
matifali
added
the
s2
Broken use cases or features (with a workaround). Only humans may set this.
label
Apr 17, 2025
I have multiple templates that all use the same files (but have different vars).
When modifying more than one simultanously I always get an error from the file API on apply:
Log
As seen in the log, the first template is successfully modified, but the other two fail.
If I run
terraform plan && terraform apply
again, the next template is okay and only one is failed.If I run it again afterwards, all succeed. It seems that there can be only be one modify at the same time?
Template definition
Planned changes
Edit: Added the plan and collapsed template
Edit Edit: Added timestamps to the log
The text was updated successfully, but these errors were encountered: