github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/testing/equivalence-tests/tests/fully_populated_complex/main.tf (about) 1 terraform { 2 required_providers { 3 tfcoremock = { 4 source = "hashicorp/tfcoremock" 5 version = "0.1.1" 6 } 7 } 8 } 9 10 provider "tfcoremock" {} 11 12 resource "tfcoremock_complex_resource" "complex" { 13 id = "64564E36-BFCB-458B-9405-EBBF6A3CAC7A" 14 15 number = 123456789.0 16 integer = 987654321 17 float = 987654321.0 18 19 string = "a not very long or complex string" 20 21 bool = true 22 23 list = [ 24 { 25 string = "this is my first entry in the list, and doesn't contain anything interesting" 26 }, 27 { 28 string = "this is my second entry in the list\nI am a bit more interesting\nand contain multiple lines" 29 }, 30 { 31 string = "this is my third entry, and I actually have a nested list" 32 33 list = [ 34 { 35 number = 0 36 }, 37 { 38 number = 1 39 }, 40 { 41 number = 2 42 } 43 ] 44 }, 45 { 46 string = "this is my fourth entry, and I actually have a nested set" 47 48 set = [ 49 { 50 number = 0 51 }, 52 { 53 number = 1 54 }, 55 ] 56 } 57 ] 58 59 object = { 60 string = "i am a nested object" 61 62 number = 0 63 bool = false 64 65 object = { 66 string = "i am a nested nested object" 67 number = 1 68 bool = true 69 } 70 } 71 72 map = { 73 "key_one" = { 74 string = "this is my first entry in the map, and doesn't contain anything interesting" 75 }, 76 "key_two" = { 77 string = "this is my second entry in the map\nI am a bit more interesting\nand contain multiple lines" 78 }, 79 "key_three" = { 80 string = "this is my third entry, and I actually have a nested list" 81 82 list = [ 83 { 84 number = 0 85 }, 86 { 87 number = 1 88 }, 89 { 90 number = 2 91 } 92 ] 93 }, 94 "key_four" = { 95 string = "this is my fourth entry, and I actually have a nested set" 96 97 set = [ 98 { 99 number = 0 100 }, 101 { 102 number = 1 103 }, 104 ] 105 } 106 } 107 108 set = [ 109 { 110 string = "this is my first entry in the set, and doesn't contain anything interesting" 111 }, 112 { 113 string = "this is my second entry in the set\nI am a bit more interesting\nand contain multiple lines" 114 }, 115 { 116 string = "this is my third entry, and I actually have a nested list" 117 118 list = [ 119 { 120 number = 0 121 }, 122 { 123 number = 1 124 }, 125 { 126 number = 2 127 } 128 ] 129 }, 130 { 131 string = "this is my fourth entry, and I actually have a nested set" 132 133 set = [ 134 { 135 number = 0 136 }, 137 { 138 number = 1 139 }, 140 ] 141 } 142 ] 143 144 list_block { 145 string = "{\"index\":0}" 146 } 147 148 list_block { 149 string = "{\"index\":1}" 150 151 list = [ 152 { 153 number = 0 154 }, 155 { 156 number = 1 157 }, 158 { 159 number = 2 160 } 161 ] 162 } 163 164 list_block { 165 string = "{\"index\":2}" 166 167 set = [ 168 { 169 number = 0 170 }, 171 { 172 number = 1 173 }, 174 ] 175 } 176 177 set_block { 178 string = "{\"index\":0}" 179 } 180 181 set_block { 182 string = "{\"index\":1}" 183 184 list = [ 185 { 186 number = 0 187 }, 188 { 189 number = 1 190 }, 191 { 192 number = 2 193 } 194 ] 195 } 196 197 set_block { 198 string = "{\"index\":2}" 199 200 set = [ 201 { 202 number = 0 203 }, 204 { 205 number = 1 206 }, 207 ] 208 } 209 }