coder / coder/terraform-provider-coderd

resource `coderd_template` make the `active` or `versions` attribute optional

Open
#273 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
29
Forks
13
Avg merge
1d 20h
Merged PRs (30d)
20

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.