Skip to content
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

feat(jetbrains-gateway): add slug variable #322

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

matifali
Copy link
Member

@matifali matifali commented Oct 17, 2024

@matifali matifali self-assigned this Oct 17, 2024
@matifali matifali changed the title Reorder JetBrains IDEs and add slug variable feat(jetbrains-gateway): add slug variable Oct 17, 2024
@matifali matifali requested a review from dannykopping October 17, 2024 14:11
Copy link

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM

Nit: the reordering should probably have been done in a separate PR (but thank you for doing it!) since it isn't related to this change, and complicated the review.

@matifali
Copy link
Member Author

@dannykopping Thank you. I will extract the ordering changes to a separate PR.

@matifali matifali force-pushed the atif/jetbrains-gateway-slug branch from 9385288 to b37f99a Compare October 17, 2024 14:20
@matifali matifali force-pushed the atif/jetbrains-gateway-slug branch from b37f99a to 7bb97ae Compare October 17, 2024 14:22
@matifali matifali enabled auto-merge (squash) October 17, 2024 14:22
@matifali matifali merged commit 8e0dfcd into main Oct 17, 2024
2 checks passed
@matifali matifali deleted the atif/jetbrains-gateway-slug branch October 17, 2024 14:25
@djarbz
Copy link
Contributor

djarbz commented Oct 17, 2024

@matifali I just saw this on your v1.0.21 release.
Just wondering if it might have been better to have the default be the selected IDE? That way it should always be unique by default, I don't see a reason to add the same IDE more than once.

@matifali
Copy link
Member Author

@djarbz The dault should already be the selected IDE> IF you use the module like

module "jetbrains_gateway" {
  source         = "registry.coder.com/modules/jetbrains-gateway/coder"
  version        = ">= 1.0.0"
  agent_id       = coder_agent.dev.id
  agent_name     = "dev"
  folder         = local.repo_dir
  jetbrains_ides = ["GO", "WS"]
  default        = "GO"
  latest         = true
}

Then GoLand will be the selected IDE when creating the workspace.

I did this for a user request to display two buttons on the workspace page, and an easier way to achieve that was to allow the module to be re-used. Unfortunately, that solution did not work because the same coder_parameter name can't be used twice.

@djarbz
Copy link
Contributor

djarbz commented Oct 18, 2024

Ahh, I was referring to this default.

variable "slug" { 
   type        = string 
   description = "The slug for the coder_app. Allows resuing the module with the same template." 
   default     = "gateway" 
 } 
 

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.

jetbrains-gateway: allow specifying slug for multiple use of the module
3 participants