github.com/mineiros-io/terradoc@v0.0.9-0.20220711062319-018bd4ae81f5/test/testdata/parser-input.tfdoc.hcl (about) 1 header { 2 image = "https://raw.githubusercontent.com/mineiros-io/brand/3bffd30e8bdbbde32c143e2650b2faa55f1df3ea/mineiros-primary-logo.svg" 3 url = "https://www.mineiros.io" 4 } 5 6 section { 7 title = "root section" 8 content = <<END 9 This is the root section content. 10 11 Section contents support anything markdown and allow us to make references like this one: [mineiros-website] 12 END 13 14 toc = true 15 16 section { 17 title = "sections with variables" 18 19 section { 20 title = "example" 21 22 variable "person" { 23 type = object(person) 24 description = "describes the last person who bothered to change this file" 25 26 attribute "name" { 27 type = string 28 description = "the person's name" 29 default = "nathan" 30 } 31 } 32 } 33 34 section { 35 title = "section of beers" 36 content = "an excuse to mention alcohol" 37 38 variable "beers" { 39 type = list(beer) 40 41 description = "a list of beers" 42 default = [] 43 44 required = true 45 46 forces_recreation = true 47 48 readme_example = <<END 49 beers = [ 50 { 51 name = "guinness" 52 type = "stout" 53 abv = 4.2 54 tags = [ 55 "dark", 56 "irish", 57 ] 58 } 59 ] 60 END 61 62 attribute "name" { 63 type = string 64 65 description = "the name of the beer" 66 } 67 68 attribute "type" { 69 type = string 70 71 description = "the type of the beer" 72 73 forces_recreation = true 74 } 75 76 attribute "abv" { 77 type = number 78 79 description = "beer's alcohol by volume content" 80 81 forces_recreation = true 82 } 83 84 attribute "tags" { 85 type = list(string) 86 87 description = "a list of tags for the beer" 88 89 default = [] 90 } 91 } 92 } 93 94 section { 95 title = "Outputs!" 96 97 output "obj_output" { 98 type = object(an_object_label) 99 description = "an example object" 100 } 101 102 output "string_output" { 103 type = string 104 description = "a string" 105 } 106 107 output "list_output" { 108 type = list(example) 109 description = "a list of example objects" 110 } 111 112 output "resource_output" { 113 type = resource(google_xxxx) 114 description = "a resource output" 115 } 116 } 117 } 118 } 119 120 references { 121 ref "mineiros-website" { 122 value = "https://www.mineiros.io" 123 } 124 }