From 69fe131571f14221fc35bbcfd8fa8a5fca5fd6ef Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Fri, 31 Jan 2020 07:42:16 -0800 Subject: [PATCH] switch trilean to boolean in docs to prevent confusion (#8673) --- cmd/struct-markdown/main.go | 2 ++ .../alicloud/ecs/_AlicloudDiskDevice-not-required.html.md | 2 +- .../alicloud/ecs/_AlicloudImageConfig-not-required.html.md | 2 +- .../builder/alicloud/ecs/_RunConfig-not-required.html.md | 2 +- .../builder/amazon/common/_AMIConfig-not-required.html.md | 4 ++-- .../builder/amazon/common/_BlockDevice-not-required.html.md | 2 +- .../builder/amazon/ebsvolume/_Config-not-required.html.md | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cmd/struct-markdown/main.go b/cmd/struct-markdown/main.go index 9d0bf3a5b..77ba2cd9f 100644 --- a/cmd/struct-markdown/main.go +++ b/cmd/struct-markdown/main.go @@ -114,6 +114,8 @@ func main() { switch fieldType { case "time.Duration": fieldType = `duration string | ex: "1h5m2s"` + case "config.Trilean": + fieldType = `boolean` } field := Field{ diff --git a/website/source/partials/builder/alicloud/ecs/_AlicloudDiskDevice-not-required.html.md b/website/source/partials/builder/alicloud/ecs/_AlicloudDiskDevice-not-required.html.md index d2164920f..6f9e07351 100644 --- a/website/source/partials/builder/alicloud/ecs/_AlicloudDiskDevice-not-required.html.md +++ b/website/source/partials/builder/alicloud/ecs/_AlicloudDiskDevice-not-required.html.md @@ -30,7 +30,7 @@ - `disk_device` (string) - Device information of the related instance: such as /dev/xvdb It is null unless the Status is In_use. -- `disk_encrypted` (config.Trilean) - Whether or not to encrypt the data disk. +- `disk_encrypted` (boolean) - Whether or not to encrypt the data disk. If this option is set to true, the data disk will be encryped and corresponding snapshot in the target image will also be encrypted. By default, if this is an extra data disk, Packer will not encrypt the data disk. Otherwise, Packer will keep the encryption setting to what diff --git a/website/source/partials/builder/alicloud/ecs/_AlicloudImageConfig-not-required.html.md b/website/source/partials/builder/alicloud/ecs/_AlicloudImageConfig-not-required.html.md index 0cb15428c..1aaffe8f3 100644 --- a/website/source/partials/builder/alicloud/ecs/_AlicloudImageConfig-not-required.html.md +++ b/website/source/partials/builder/alicloud/ecs/_AlicloudImageConfig-not-required.html.md @@ -19,7 +19,7 @@ uppercase/lowercase letter or a Chinese character, and may contain numbers, _ or -. It cannot begin with http:// or https://. -- `image_encrypted` (config.Trilean) - Whether or not to encrypt the target images, including those copied if image_copy_regions is specified. If this option +- `image_encrypted` (boolean) - Whether or not to encrypt the target images, including those copied if image_copy_regions is specified. If this option is set to true, a temporary image will be created from the provisioned instance in the main region and an encrypted copy will be generated in the same region. By default, Packer will keep the encryption setting to what diff --git a/website/source/partials/builder/alicloud/ecs/_RunConfig-not-required.html.md b/website/source/partials/builder/alicloud/ecs/_RunConfig-not-required.html.md index 2c10f99f1..5e7e69a0d 100644 --- a/website/source/partials/builder/alicloud/ecs/_RunConfig-not-required.html.md +++ b/website/source/partials/builder/alicloud/ecs/_RunConfig-not-required.html.md @@ -3,7 +3,7 @@ - `associate_public_ip_address` (bool) - Associate Public Ip Address - `zone_id` (string) - ID of the zone to which the disk belongs. -- `io_optimized` (config.Trilean) - Whether an ECS instance is I/O optimized or not. If this option is not +- `io_optimized` (boolean) - Whether an ECS instance is I/O optimized or not. If this option is not provided, the value will be determined by product API according to what `instance_type` is used. diff --git a/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md b/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md index f11acf43f..d6b77c62c 100644 --- a/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md +++ b/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md @@ -32,7 +32,7 @@ [template engine](/docs/templates/engine.html), see [Build template data](#build-template-data) for more information. -- `ena_support` (config.Trilean) - Enable enhanced networking (ENA but not SriovNetSupport) on +- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy. @@ -54,7 +54,7 @@ associated with AMIs, which have been deregistered by force_deregister. Default false. -- `encrypt_boot` (config.Trilean) - Whether or not to encrypt the resulting AMI when +- `encrypt_boot` (boolean) - Whether or not to encrypt the resulting AMI when copying a provisioned instance to an AMI. By default, Packer will keep the encryption setting to what it was in the source image. Setting false will result in an unencrypted image, and true will result in an encrypted one. diff --git a/website/source/partials/builder/amazon/common/_BlockDevice-not-required.html.md b/website/source/partials/builder/amazon/common/_BlockDevice-not-required.html.md index 1755685d9..8438070e0 100644 --- a/website/source/partials/builder/amazon/common/_BlockDevice-not-required.html.md +++ b/website/source/partials/builder/amazon/common/_BlockDevice-not-required.html.md @@ -8,7 +8,7 @@ - `device_name` (string) - The device name exposed to the instance (for example, /dev/sdh or xvdh). Required for every device in the block device mapping. -- `encrypted` (config.Trilean) - Indicates whether or not to encrypt the volume. By default, Packer will +- `encrypted` (boolean) - Indicates whether or not to encrypt the volume. By default, Packer will keep the encryption setting to what it was in the source image. Setting false will result in an unencrypted device, and true will result in an encrypted one. diff --git a/website/source/partials/builder/amazon/ebsvolume/_Config-not-required.html.md b/website/source/partials/builder/amazon/ebsvolume/_Config-not-required.html.md index 27cf0f617..e49c6aca0 100644 --- a/website/source/partials/builder/amazon/ebsvolume/_Config-not-required.html.md +++ b/website/source/partials/builder/amazon/ebsvolume/_Config-not-required.html.md @@ -1,6 +1,6 @@ -- `ena_support` (config.Trilean) - Enable enhanced networking (ENA but not SriovNetSupport) on +- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy. Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's documentation on enabling enhanced