coder / coder/terraform-provider-coder

Automatically update provider version in coder/coder upon release

Open
#335 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
60
Forks
27
Avg merge
1d 21h
Merged PRs (30d)
2

Description

# Problem

In `coder/coder` and `coder/modules`, we reference the `coder/coder` Terraform provider version in multiple places (https://github.com/coder/coder/pull/16309#pullrequestreview-2580241216)

* `provisioner/terraform/testdata`
* `examples/templates/*`
* all of our modules in `coder/modules`

When a new version of the Terraform provider is released, we currently do not have any way of updating references to the provider version we reference in `coder/coder`. We currently just "handwave" it by:

1) Not specifying a version at all (most example templates)
2) Specifying `>= 0.x` (in our modules)
3) Specifying provider version `~> 1.0.0` (2 example templates)

This leads to significant version sprawl and makes it difficult to make informed decisions about what version of the provider is actually in use.

# Proposed Solution

> A better option would be to set version constraints that we auto-bump when new provider versions are released.

We could possibly couple this to the release workflow of the provider:
* After a release, clone the Coder repo at main
* Run a script that updates the provider version in the required places
* Commit and push a branch, and create a PR on coder/coder

_Originally posted by @johnstcn in https://github.com/coder/coder/issues/16309#issuecomment-2621308491_

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the provider release workflow and the referenced locations in provisioner/terraform/testdata, examples/templates/*, and coder/modules. Determine how provider releases can trigger an update across those references and what repository permissions and validation are needed. Done means a released provider version produces an automated branch and pull request with all intended references updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
terraform
Domain
ci-cd, devops, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.