turbot / pipe-fittings

Shared components for use across pipe projects.
https://github.com/turbot
GNU Affero General Public License v3.0
12 stars 3 forks source link

Flowpipe pipeline param default value compatibility test with the declared type. #441

Closed vhadianto closed 4 weeks ago

vhadianto commented 4 weeks ago

This declaration should pass:

  param "actions" {
    description = "A map of actions, if approvers are set these will be offered as options to select, else the one matching the default_action will be used."
    type = map(object({
      label         = string
      value         = string
      style         = string
      pipeline_ref  = any
      pipeline_args = any
      success_msg   = string
      error_msg     = string
    }))
    default = {
      "skip" = {
        label         = "Skip"
        value         = "skip"
        style         = "info"
        pipeline_ref  = pipeline.optional_message
        pipeline_args = {
          notifier = "default"
          send     = false
          text     = "Skipped item."
        }
        success_msg   = ""
        error_msg     = ""
      }
    }
  }

But it fails.