From c5c3585df1dae7b41669ae8e088ef79345ec035d Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Tue, 21 Apr 2020 12:22:37 +0200 Subject: [PATCH] make docs a bit more readable for KeyValues too --- cmd/struct-markdown/main.go | 2 ++ .../builder/alicloud/ecs/AlicloudImageConfig-not-required.mdx | 2 +- .../partials/builder/amazon/chroot/Config-not-required.mdx | 2 +- .../partials/builder/amazon/common/AMIConfig-not-required.mdx | 4 ++-- .../partials/builder/amazon/common/RunConfig-not-required.mdx | 4 ++-- .../builder/amazon/ebsvolume/BlockDevice-not-required.mdx | 2 +- .../partials/builder/amazon/ebsvolume/Config-not-required.mdx | 2 +- .../pages/partials/builder/hyperone/Config-not-required.mdx | 2 +- .../tencentcloud/cvm/TencentCloudRunConfig-not-required.mdx | 2 +- .../builder/triton/SourceMachineConfig-not-required.mdx | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cmd/struct-markdown/main.go b/cmd/struct-markdown/main.go index a9d26870f..c0b547f1c 100644 --- a/cmd/struct-markdown/main.go +++ b/cmd/struct-markdown/main.go @@ -119,6 +119,8 @@ func main() { fieldType = `boolean` case "hcl2template.NameValues": fieldType = `[]{name string, value string}` + case "hcl2template.KeyValues": + fieldType = `[]{key string, value string}` } field := Field{ diff --git a/website/pages/partials/builder/alicloud/ecs/AlicloudImageConfig-not-required.mdx b/website/pages/partials/builder/alicloud/ecs/AlicloudImageConfig-not-required.mdx index 9e37ca0a4..88dfdf41a 100644 --- a/website/pages/partials/builder/alicloud/ecs/AlicloudImageConfig-not-required.mdx +++ b/website/pages/partials/builder/alicloud/ecs/AlicloudImageConfig-not-required.mdx @@ -52,7 +52,7 @@ - `tags` (map[string]string) - Key/value pair tags applied to the destination image and relevant 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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) will allow you to create those programatically. diff --git a/website/pages/partials/builder/amazon/chroot/Config-not-required.mdx b/website/pages/partials/builder/amazon/chroot/Config-not-required.mdx index 8700c918a..668721f1a 100644 --- a/website/pages/partials/builder/amazon/chroot/Config-not-required.mdx +++ b/website/pages/partials/builder/amazon/chroot/Config-not-required.mdx @@ -125,7 +125,7 @@ a [template engine](/docs/templates/engine), see [Build template 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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) will allow you to create those programatically. diff --git a/website/pages/partials/builder/amazon/common/AMIConfig-not-required.mdx b/website/pages/partials/builder/amazon/common/AMIConfig-not-required.mdx index 093a01830..2c1ea36cb 100644 --- a/website/pages/partials/builder/amazon/common/AMIConfig-not-required.mdx +++ b/website/pages/partials/builder/amazon/common/AMIConfig-not-required.mdx @@ -32,7 +32,7 @@ engine](/docs/templates/engine), see [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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) will allow you to create those programatically. @@ -103,7 +103,7 @@ engine](/docs/templates/engine), see [Build template 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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) will allow you to create those programatically. diff --git a/website/pages/partials/builder/amazon/common/RunConfig-not-required.mdx b/website/pages/partials/builder/amazon/common/RunConfig-not-required.mdx index 1e0713b95..e1495a900 100644 --- a/website/pages/partials/builder/amazon/common/RunConfig-not-required.mdx +++ b/website/pages/partials/builder/amazon/common/RunConfig-not-required.mdx @@ -114,7 +114,7 @@ engine](/docs/templates/engine), see [Build template 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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) 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 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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) will allow you to create those programatically. diff --git a/website/pages/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx b/website/pages/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx index 7778a4e10..3899a8c18 100644 --- a/website/pages/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx +++ b/website/pages/partials/builder/amazon/ebsvolume/BlockDevice-not-required.mdx @@ -4,7 +4,7 @@ completes. This is a [template engine](/docs/templates/engine), see [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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) will allow you to create those programatically. diff --git a/website/pages/partials/builder/amazon/ebsvolume/Config-not-required.mdx b/website/pages/partials/builder/amazon/ebsvolume/Config-not-required.mdx index 9ef2c8354..59bcb99cf 100644 --- a/website/pages/partials/builder/amazon/ebsvolume/Config-not-required.mdx +++ b/website/pages/partials/builder/amazon/ebsvolume/Config-not-required.mdx @@ -36,7 +36,7 @@ configured in the `ebs_volumes` section as soon as the instance is 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 the [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) diff --git a/website/pages/partials/builder/hyperone/Config-not-required.mdx b/website/pages/partials/builder/hyperone/Config-not-required.mdx index 5db1f52f8..691221571 100644 --- a/website/pages/partials/builder/hyperone/Config-not-required.mdx +++ b/website/pages/partials/builder/hyperone/Config-not-required.mdx @@ -17,7 +17,7 @@ - `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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) will allow you to create those programatically. diff --git a/website/pages/partials/builder/tencentcloud/cvm/TencentCloudRunConfig-not-required.mdx b/website/pages/partials/builder/tencentcloud/cvm/TencentCloudRunConfig-not-required.mdx index c4cb48b21..8b354a99d 100644 --- a/website/pages/partials/builder/tencentcloud/cvm/TencentCloudRunConfig-not-required.mdx +++ b/website/pages/partials/builder/tencentcloud/cvm/TencentCloudRunConfig-not-required.mdx @@ -55,7 +55,7 @@ - `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. -- `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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) will allow you to create those programatically. diff --git a/website/pages/partials/builder/triton/SourceMachineConfig-not-required.mdx b/website/pages/partials/builder/triton/SourceMachineConfig-not-required.mdx index 385f09e3a..069f5d8cb 100644 --- a/website/pages/partials/builder/triton/SourceMachineConfig-not-required.mdx +++ b/website/pages/partials/builder/triton/SourceMachineConfig-not-required.mdx @@ -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_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 [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) will allow you to create those programatically.