github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/tests/manual_testing/variables/query.sp (about) 1 variable "account"{ 2 type = string 3 description = "the account to use" 4 } 5 6 variable "reason"{ 7 type = string 8 description = "reason for failure" 9 default = "check failed" 10 } 11 12 variable "regions"{ 13 type = list(string) 14 description = "the available regions" 15 default = ["eu-west2", "us-east1"] 16 } 17 18 variable "v1"{ 19 type = string 20 default = "select 'default'" 21 } 22 23 variable "v2"{ 24 type = list(string) 25 default=["select 1"] 26 27 } 28 29 variable "v3" { 30 type = list(object({ 31 internal = number 32 external = number 33 query = string 34 })) 35 default = [ 36 { 37 internal = 8300 38 external = 8300 39 query = "select 'default4'" 40 } 41 ] 42 } 43 44 variable "v4"{ 45 type = string 46 description="this is v4" 47 } 48 49 query "q1"{ 50 title ="Q1" 51 description = var.reason 52 sql = "select ${var.regions[0]}" 53 } 54 55 query "q2"{ 56 title ="Q2" 57 description = "THIS IS QUERY 2" 58 sql = var.v2[0] 59 } 60 61 query "q3"{ 62 title ="Q3" 63 description = query.q1.description 64 sql = var.v3[0].query 65 } 66 67 variable "stringVar"{} 68 variable "numberVar"{} 69 variable "floatVar"{} 70 variable "stringArrayVar"{} 71 variable "intArrayVar"{} 72 variable "objcArrayVar"{} 73 variable "boolVar"{}