Skip to content

How to hide a coder_app resource? #11349

Answered by MrPeacockNLB
ElioDiNino asked this question in Q&A
Discussion options

You must be logged in to vote

We use count in Terraform to enable/disable a coder_app resource. But we know at provision time if a coder_app is enabled or not.

This should work in your case as you already know if the developer wants a coder instance.

resource "coder_app" "code-server" {
  count        = (data.coder_parameter.code_server.value == true) ? 1 : 0

  agent_id     = coder_agent.main.id
  slug         = "code-server"
  display_name = "code-server"
...

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by matifali
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
feature Something we don't have yet
4 participants
Converted from issue

This discussion was converted from issue #8326 on December 29, 2023 05:36.