- Notifications
You must be signed in to change notification settings - Fork3
Description
Currently, a change in the tf_vars property does not trigger a recreation but a modification of the template.
As the tf_vars effectively change the content of the template, it should trigger a new version.
As an example, it would be possible to change the name of a parameter via tf_var.
A more drastic example to show what would be possible is to base the entire coder parameters on a tf_var:
template.tf
resource"coderd_template""example" {name="example"description="example"versions=[ { directory="./template" active=true tf_vars= [{ name="parameters" value=jsonencode(["cpu","memory" ]) }] } ]}
in the template:
variable"parameters" {type=string}locals {parameters=jsondecode(var.parameters)}data"coder_parameter""parameters" {for_each=toset(local.parameters)name=each.key}
If I change the content of the parameters var via the coderd_template in this scenario, the whole template would change.
Metadata
Metadata
Assignees
Labels
No labels