Not sure if this would be an anti-pattern or require a massive re-write, but was curious if it's possible to make the active attribute optional. The coder templates push command, even if you were to set --activate to false, if a template doesn't exist already, will automatically still set the first version to "active".
Use-case for this is to make it so that the active status doesn't need to be tracked through Terraform. Rather, I can manually set active versions without accidentally deleting/replacing versions that are being tracked by coderd if another terraform apply is executed.
Update: This could be applicable to the versions attribute as well for customers looking into allowing an external job to push the template version. Maybe this is a change required on the Coder side, but would it be possible to have an empty scaffold template deploying our "https://github.com/coder/coder/blob/main/examples/templates/scratch/main.tf" template that doesn't manage active versions? On the initial create it'll just flag the scratch template as active, but not really track it.
Not sure if this would be an anti-pattern or require a massive re-write, but was curious if it's possible to make the
activeattribute optional. Thecoder templates pushcommand, even if you were to set--activateto false, if a template doesn't exist already, will automatically still set the first version to "active".Use-case for this is to make it so that the active status doesn't need to be tracked through Terraform. Rather, I can manually set active versions without accidentally deleting/replacing versions that are being tracked by coderd if another
terraform applyis executed.Update: This could be applicable to the
versionsattribute as well for customers looking into allowing an external job to push the template version. Maybe this is a change required on the Coder side, but would it be possible to have an empty scaffold template deploying our "https://github.com/coder/coder/blob/main/examples/templates/scratch/main.tf" template that doesn't manage active versions? On the initial create it'll just flag the scratch template as active, but not really track it.