Skip to content

Coder Terraform Provider: add post-release CI step to update module versions #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnstcn opened this issue Feb 18, 2025 · 1 comment
Labels
m estimated at less than 1 week of work tests

Comments

@johnstcn
Copy link
Member

Problem

coder/coder has a number of test fixtures, examples, and other Terraform files that reference the coder/coder Terrafomr provider. Some of them fix the version, and some do not.
After releasing an updated version of coder/terraform-provider-coder, these versions may become out of date.

$ rg -t tf 'source\s+=\s+"coder/coder"' | awk -F ':' '{print $1}' | xargs -l dirname | sort | uniq
# Note: it would actually be amazing to be able to keep this on the latest 'main', but we would
# need to push a pre-release version on every commit.
dogfood/contents
dogfood/contents/zed
envbuilder-dogfood
# Note: the examples directory may not be as important but keeping it in scope for now
examples/jfrog/docker
examples/parameters
examples/parameters-dynamic-options
examples/templates/aws-devcontainer
examples/templates/aws-linux
examples/templates/aws-windows
examples/templates/azure-linux
examples/templates/azure-windows
examples/templates/digitalocean-linux
examples/templates/docker
examples/templates/docker-devcontainer
examples/templates/gcp-devcontainer
examples/templates/gcp-linux
examples/templates/gcp-vm-container
examples/templates/gcp-windows
examples/templates/incus
examples/templates/kubernetes
examples/templates/kubernetes-devcontainer
examples/templates/kubernetes-envbox
examples/templates/nomad-docker
examples/templates/scratch
examples/workspace-tags
provisioner/terraform/testdata/calling-module
provisioner/terraform/testdata/chaining-resources
provisioner/terraform/testdata/conflicting-resources
provisioner/terraform/testdata/display-apps
provisioner/terraform/testdata/display-apps-disabled
provisioner/terraform/testdata/external-auth-providers
provisioner/terraform/testdata/instance-id
provisioner/terraform/testdata/kubernetes-metadata
provisioner/terraform/testdata/mapped-apps
provisioner/terraform/testdata/multiple-agents
provisioner/terraform/testdata/multiple-agents-multiple-apps
provisioner/terraform/testdata/multiple-agents-multiple-envs
provisioner/terraform/testdata/multiple-agents-multiple-monitors
provisioner/terraform/testdata/multiple-agents-multiple-scripts
provisioner/terraform/testdata/multiple-apps
provisioner/terraform/testdata/presets
provisioner/terraform/testdata/presets/external-module
provisioner/terraform/testdata/presets/external-module/child-external-module
provisioner/terraform/testdata/resource-metadata
provisioner/terraform/testdata/resource-metadata-duplicate
provisioner/terraform/testdata/rich-parameters
provisioner/terraform/testdata/rich-parameters/external-module
provisioner/terraform/testdata/rich-parameters/external-module/child-external-module
provisioner/terraform/testdata/rich-parameters-order
provisioner/terraform/testdata/rich-parameters-validation
scaletest/templates/kubernetes-large
scaletest/templates/kubernetes-medium
scaletest/templates/kubernetes-medium-greedy
scaletest/templates/kubernetes-minimal
scaletest/templates/kubernetes-small
scaletest/templates/scaletest-runner
scaletest/terraform/action
scaletest/terraform/k8s

Not fixing the provider version may cause unintended changes and flakes.

Proposed Solution

  1. Create a script that will update all references to the coder/coder provider to a specified version. It should probably also run make gen etc.
  2. Add a post-release CI step in coder/terraform-provider-coder to clone coder/coder, run the above script, and submit a PR.
  3. ???
  4. Profit!

This should allow us to automate updates to the provider version and control the version drift.

@johnstcn johnstcn added tests m estimated at less than 1 week of work labels Feb 18, 2025
@johnstcn
Copy link
Member Author

Duplicate of coder/terraform-provider-coder#335 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
m estimated at less than 1 week of work tests
Projects
None yet
Development

No branches or pull requests

1 participant