powerpipe icon indicating copy to clipboard operation
powerpipe copied to clipboard

Text resource support for args

Open gabrielsoltz opened this issue 11 months ago • 2 comments

Hey, hello 👋

We are trying to build dynamic text resources based on other resources, like input resources, but it seems it's not supported...

This could be really useful for relying on text resources to create dynamic links to other dashboards and set GET parameters.

For example:

input "team" {
  # title = "Select a Team"
  type  = "select"
  width = 4
  option "Team1" {
    label = "Team 1"
  }

text {
    value = <<-EOM
        ### Dashboards: [Dashboard 1](${var.host}/local.dashboard.main?input.team=$1
      EOM
     args = {
        team = self.input.team.value
      }
  }

gabrielsoltz avatar Mar 20 '24 17:03 gabrielsoltz

@gabrielsoltz what errors are you seeing when you try to use this approach

kaidaguerre avatar Apr 10 '24 12:04 kaidaguerre

HI @kaidaguerre, args are not supported in text resources: https://powerpipe.io/docs/powerpipe-hcl/text

gabrielsoltz avatar Apr 10 '24 12:04 gabrielsoltz

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Jun 10 '24 08:06 github-actions[bot]

This issue was closed because it has been stalled for 90 days with no activity.

github-actions[bot] avatar Jul 10 '24 08:07 github-actions[bot]