From eeb04c6a07450348b92bfa80e904f73778b5ccf8 Mon Sep 17 00:00:00 2001 From: Bastiaan Schaap Date: Fri, 31 Aug 2018 07:26:11 +0200 Subject: [PATCH] Add TypeStringBoolean equivalence from #5632 --- aws/resource_aws_launch_template.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/aws/resource_aws_launch_template.go b/aws/resource_aws_launch_template.go index 067d711c40c..7f148e6f33f 100644 --- a/aws/resource_aws_launch_template.go +++ b/aws/resource_aws_launch_template.go @@ -159,13 +159,14 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "ebs_optimized": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{ - "", - "false", - "true", - }, false), + // Use TypeString to allow an "unspecified" value, + // since TypeBool only has true/false with false default. + // The conversion from bare true/false values in + // configurations to TypeString value is currently safe. + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: suppressEquivalentTypeStringBoolean, + ValidateFunc: validateTypeStringNullableBoolean, }, "elastic_gpu_specifications": {