make docs a bit more readable for KeyValues too

This commit is contained in:
Adrien Delorme 2020-04-21 12:22:37 +02:00
parent 73242e8de4
commit c5c3585df1
10 changed files with 13 additions and 11 deletions

View File

@ -119,6 +119,8 @@ func main() {
fieldType = `boolean` fieldType = `boolean`
case "hcl2template.NameValues": case "hcl2template.NameValues":
fieldType = `[]{name string, value string}` fieldType = `[]{name string, value string}`
case "hcl2template.KeyValues":
fieldType = `[]{key string, value string}`
} }
field := Field{ field := Field{

View File

@ -52,7 +52,7 @@
- `tags` (map[string]string) - Key/value pair tags applied to the destination image and relevant - `tags` (map[string]string) - Key/value pair tags applied to the destination image and relevant
snapshots. snapshots.
- `tag` (hcl2template.KeyValues) - Same as [`tags`](#tags) but defined as a singular repeatable block - `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block
containing a `key` and a `value` field. In HCL2 mode the containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.

View File

@ -125,7 +125,7 @@
a [template engine](/docs/templates/engine), see [Build template a [template engine](/docs/templates/engine), see [Build template
data](#build-template-data) for more information. data](#build-template-data) for more information.
- `root_volume_tag` (hcl2template.KeyValues) - Same as [`root_volume_tags`](#root_volume_tags) but defined as a - `root_volume_tag` ([]{key string, value string}) - Same as [`root_volume_tags`](#root_volume_tags) but defined as a
singular block containing a `key` and a `value` field. In HCL2 mode the singular block containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.

View File

@ -32,7 +32,7 @@
engine](/docs/templates/engine), see [Build template engine](/docs/templates/engine), see [Build template
data](#build-template-data) for more information. data](#build-template-data) for more information.
- `tag` (hcl2template.KeyValues) - Same as [`tags`](#tags) but defined as a singular repeatable block - `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block
containing a `key` and a `value` field. In HCL2 mode the containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.
@ -103,7 +103,7 @@
engine](/docs/templates/engine), see [Build template engine](/docs/templates/engine), see [Build template
data](#build-template-data) for more information. data](#build-template-data) for more information.
- `snapshot_tag` (hcl2template.KeyValues) - Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular - `snapshot_tag` ([]{key string, value string}) - Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular
repeatable block containing a `key` and a `value` field. In HCL2 mode the repeatable block containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.

View File

@ -114,7 +114,7 @@
engine](/docs/templates/engine), see [Build template engine](/docs/templates/engine), see [Build template
data](#build-template-data) for more information. data](#build-template-data) for more information.
- `run_tag` (hcl2template.KeyValues) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable - `run_tag` ([]{key string, value string}) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable
block containing a `key` and a `value` field. In HCL2 mode the block containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.
@ -206,7 +206,7 @@
- `spot_tags` (map[string]string) - Requires spot_price to be set. Key/value pair tags to apply tags to the - `spot_tags` (map[string]string) - Requires spot_price to be set. Key/value pair tags to apply tags to the
spot request that is issued. spot request that is issued.
- `spot_tag` (hcl2template.KeyValues) - Same as [`spot_tags`](#spot_tags) but defined as a singular repeatable block - `spot_tag` ([]{key string, value string}) - Same as [`spot_tags`](#spot_tags) but defined as a singular repeatable block
containing a `key` and a `value` field. In HCL2 mode the containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.

View File

@ -4,7 +4,7 @@
completes. This is a [template engine](/docs/templates/engine), see completes. This is a [template engine](/docs/templates/engine), see
[Build template data](#build-template-data) for more information. [Build template data](#build-template-data) for more information.
- `tag` (hcl2template.KeyValues) - Same as [`tags`](#tags) but defined as a singular repeatable block - `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block
containing a `key` and a `value` field. In HCL2 mode the containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.

View File

@ -36,7 +36,7 @@
configured in the `ebs_volumes` section as soon as the instance is configured in the `ebs_volumes` section as soon as the instance is
reported as 'ready'. reported as 'ready'.
- `run_volume_tag` (hcl2template.KeyValues) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular - `run_volume_tag` ([]{key string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
repeatable block containing a `key` and a `value` field. In HCL2 mode repeatable block containing a `key` and a `value` field. In HCL2 mode
the the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)

View File

@ -17,7 +17,7 @@
- `image_tags` (map[string]string) - Key/value pair tags to add to the created image. - `image_tags` (map[string]string) - Key/value pair tags to add to the created image.
- `image_tag` (hcl2template.KeyValues) - Same as [`image_tags`](#image_tags) but defined as a singular repeatable - `image_tag` ([]{key string, value string}) - Same as [`image_tags`](#image_tags) but defined as a singular repeatable
block containing a `key` and a `value` field. In HCL2 mode the block containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.

View File

@ -55,7 +55,7 @@
- `run_tags` (map[string]string) - Key/value pair tags to apply to the instance that is *launched* to - `run_tags` (map[string]string) - Key/value pair tags to apply to the instance that is *launched* to
create the image. These tags are *not* applied to the resulting image. create the image. These tags are *not* applied to the resulting image.
- `run_tag` (hcl2template.KeyValues) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable - `run_tag` ([]{key string, value string}) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable
block containing a `key` and a `value` field. In HCL2 mode the block containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.

View File

@ -25,7 +25,7 @@
- `source_machine_tags` (map[string]string) - Key/value pair tags applied to the VM used to create the image. - `source_machine_tags` (map[string]string) - Key/value pair tags applied to the VM used to create the image.
- `source_machine_tag` (hcl2template.KeyValues) - Same as [`source_machine_tags`](#source_machine_tags) but defined as a - `source_machine_tag` ([]{key string, value string}) - Same as [`source_machine_tags`](#source_machine_tags) but defined as a
singular block containing a `key` and a `value` field. In HCL2 mode the singular block containing a `key` and a `value` field. In HCL2 mode the
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
will allow you to create those programatically. will allow you to create those programatically.