From 50c49396f494c0f71cade0ae77f8d2baede655e8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 18 Mar 2015 20:48:39 +0100 Subject: [PATCH] providers/aws: only set instance tenancy if its set /cc @clint --- builtin/providers/aws/resource_aws_instance.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_instance.go b/builtin/providers/aws/resource_aws_instance.go index 74c7b5845..5fb4f525a 100644 --- a/builtin/providers/aws/resource_aws_instance.go +++ b/builtin/providers/aws/resource_aws_instance.go @@ -264,7 +264,9 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error { placement := &ec2.Placement{ AvailabilityZone: aws.String(d.Get("availability_zone").(string)), - Tenancy: aws.String(d.Get("tenancy").(string)), + } + if v := d.Get("tenancy").(string); v != "" { + placement.Tenancy = aws.String(v) } iam := &ec2.IAMInstanceProfileSpecification{