Skip to content

feat: add order variable to coder_app modules #177

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

Merged
merged 5 commits into from
Mar 5, 2024

Conversation

michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Feb 29, 2024

Add per the coder docs coder applications can be reordered in the ui via the order field

https://coder.com/docs/v2/latest/templates/resource-ordering#applications

This change allows this:

module "code-server" {
  source          = "registry.coder.com/modules/code-server/coder"
  version         = "1.0.5"
  agent_id        = coder_agent.main.id
  install_version = "4.8.3"
  order           = 2
}

module "filebrowser" {
  source   = "registry.coder.com/modules/filebrowser/coder"
  version  = "1.0.3"
  agent_id = coder_agent.example.id
  folder   = "/home/coder/project"
  order    = 1
}

Closes coder/modules#178

Add per the coder docs coder applications can be reordered in the ui via the order field

https://coder.com/docs/v2/latest/templates/resource-ordering#applications
@michaelbrewer michaelbrewer changed the title feat: add order field to coder_app resources feat: add order variable to coder_app modules Feb 29, 2024
Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @michaelbrewer. Great contribution. We recently added this functionality so it will only work on deployments on latest release.
We are still looking for a suitable way to check Coder version compatibility with modules that depend on newer features.
See #121

@michaelbrewer
Copy link
Contributor Author

michaelbrewer commented Mar 2, 2024

@matifali can we bump the required provider to "0.14.2" when order was added ?

terraform {
  required_version = ">= 1.0"
  required_providers {
    coder = {
      source  = "coder/coder"
      version = ">= 0.14.2"
    }
  }
}

@matifali
Copy link
Member

matifali commented Mar 4, 2024

@michaelbrewer Yes we need to otherwise it won't be updated.

Set te coder/coder required version to >= 0.14.2 to support the order variable.
@michaelbrewer
Copy link
Contributor Author

@matifali set the required version for coder/coder to be >= 0.14.2

Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Waiting for an approval from @mtojek and then we are good to merge.

Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Thanks for working on this! Should we use the latest version of coder provider?

@michaelbrewer
Copy link
Contributor Author

michaelbrewer commented Mar 4, 2024

@mtojek - So, i can change the required version to 0.18.0 if needed, i just used 0.14.2 as this was when order was added to coder_app.

coder/terraform-provider-coder@7a00ae7

@mtojek
Copy link
Member

mtojek commented Mar 4, 2024

I see 👍 I think the last order change was introduced in v0.17.0, so maybe just bump it to this version.

@michaelbrewer
Copy link
Contributor Author

Cool @mtojek updated.

@matifali matifali merged commit a3dc364 into coder:main Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code application modules should expose the order variable to allow for UI reordering
3 participants