turbot / powerpipe

Powerpipe: Dashboards for DevOps. Visualize cloud configurations. Assess security posture against a massive library of benchmarks. Build custom dashboards with code.
https://powerpipe.io/
GNU Affero General Public License v3.0
228 stars 16 forks source link

Text resource support for args #300

Closed gabrielsoltz closed 1 month ago

gabrielsoltz commented 5 months ago

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
      }
  }
kaidaguerre commented 4 months ago

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

gabrielsoltz commented 4 months ago

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

github-actions[bot] commented 2 months ago

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] commented 1 month ago

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