github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/tests/manual_testing/demo/query_param_demo/control.sp (about)

     1  
     2  control "c1"{
     3      title ="C1"
     4      description = "THIS IS CONTROL 1"
     5      query = query.q1
     6  }
     7  
     8  control "c2"{
     9      title ="C2"
    10      description = "THIS IS CONTROL 2"
    11      query = query.q1
    12      args = {
    13          "p1" = "control2 "
    14          "p3" = "a reason"
    15      }
    16  }
    17  
    18  control "c3"{
    19      title ="C3"
    20      description = "THIS IS CONTROL 3"
    21      query = query.q1
    22      args = [  "control3____ ", "because FOO ______ " ]
    23  }
    24  
    25  control "c4"{
    26      title ="C4"
    27      description = "THIS IS CONTROL 4"
    28      sql = "select 'ok' as status, 'foo' as resource, concat($1::text, $2::text, $3::text) as reason"
    29      param "p1"{
    30          description = "p1"
    31          default = "c_default_control "
    32      }
    33      param "p2"{
    34          description = "p2"
    35          default = "c_because_def "
    36      }
    37  
    38      param "p3"{
    39          description = "p3"
    40          default = "c_string"
    41      }
    42  }
    43  
    44  control "c5"{
    45      title ="C5"
    46      description = "THIS IS CONTROL 5"
    47      sql = "select 'ok' as status, 'foo' as resource, concat($1::text, $2::text, $3::text) as reason"
    48      param "p1"{
    49          description = "p1"
    50          default = "c_default_control "
    51      }
    52      param "p2"{
    53          description = "p2"
    54          default = "c_because_def "
    55      }
    56      param "p3"{
    57          description = "p3"
    58          default = "c_string"
    59      }
    60      args = [  "control5____ ", "because FOO_c5 ______ " ]
    61  }
    62  control "c5_this_is_a_very_long_name_no_even_longer_than_that_really_really_long_1"{
    63      title ="C5"
    64      description = "THIS IS CONTROL 5"
    65      sql = "select 'ok' as status, 'foo' as resource, concat($1::text, $2::text, $3::text) as reason"
    66      param "p1"{
    67          description = "p1"
    68          default = "c_default_control "
    69      }
    70      param "p2"{
    71          description = "p2"
    72          default = "c_because_def "
    73      }
    74      param "p3"{
    75          description = "p3"
    76          default = "c_string"
    77      }
    78  }
    79  
    80  control "c5_this_is_a_very_long_name_no_even_longer_than_that_really_really_long_2"{
    81      title ="C5"
    82      description = "THIS IS CONTROL 5"
    83      sql = "select 'ok' as status, 'foo' as resource, concat($1::text, $2::text, $3::text) as reason"
    84      param "p1"{
    85          description = "p1"
    86          default = "c_default_control "
    87      }
    88      param "p2"{
    89          description = "p2"
    90          default = "c_because_def "
    91      }
    92      param "p3"{
    93          description = "p3"
    94          default = "c_string"
    95      }
    96  }
    97  
    98  
    99  control "control_with_param_defauls_and_args"{
   100      title ="C5"
   101      description = "THIS IS CONTROL 5"
   102      sql = "select 'ok' as status, 'foo' as resource, concat($1::text, $2::text, $3::text) as reason"
   103      param "p1"{
   104          description = "p1"
   105          default = "c_default_control "
   106      }
   107      param "p2"{
   108          description = "p2"
   109          default = "c_because_def "
   110      }
   111      param "p3"{
   112          description = "p3"
   113          default = "c_string"
   114      }
   115  //    args  = {
   116  //        p1 = "arg_control"
   117  //    }
   118  }