turbot / flowpipe

Flowpipe is a cloud scripting engine. Automation and workflow to connect your clouds to the people, systems and data that matters.
https://flowpipe.io
GNU Affero General Public License v3.0
385 stars 16 forks source link

Show enum values when prompted for a variable value in terminal #941

Open cbruno10 opened 1 month ago

cbruno10 commented 1 month ago

Is your feature request related to a problem? Please describe. If I have a var with enum set with no default value and I run flowpipe server (or flowpipe pipeline run), should I be shown the possible values? Currently it’s not showing anything extra:

cbruno@M1P awscompliance % flowpipe server
{"time":"2024-10-16T01:54:43.272274-04:00","level":"ERROR","msg":"Error loading input variables","error":"missing 1 variable value:\n\tcis_v300_2_enabled_pipelines not set\n"}

Variables defined with no value set.
var.cis_v300_2_enabled_pipelines
  List of CIS v3.0.0 section 2 pipelines to enable.

  Enter a value:

Var definition:

variable "cis_v300_2_enabled_pipelines" {
  type        = list(string)
  description = "List of CIS v3.0.0 section 2 pipelines to enable."

  /*
  default = [
    #"cis_v300_2_1_1",
    #"cis_v300_2_1_2",
    #"cis_v300_2_1_3",
    #"cis_v300_2_1_4",
    "cis_v300_2_2_1",
    #"cis_v300_2_3_1",
    #"cis_v300_2_3_2",
    #"cis_v300_2_3_3",
    #"cis_v300_2_4_1"
  ]
  */

  enum = [
    "cis_v300_2_1_1",
    "cis_v300_2_1_2",
    "cis_v300_2_1_3",
    "cis_v300_2_1_4",
    "cis_v300_2_2_1",
    "cis_v300_2_3_1",
    "cis_v300_2_3_2",
    "cis_v300_2_3_3",
    "cis_v300_2_4_1"
  ]
}

Describe the solution you'd like Show enum values

Describe alternatives you've considered Look at var definition

Additional context Add any other context or screenshots about the feature request here.