From fcd89828f9a10bcf4742e6249f07f4cdc20276c6 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Wed, 3 Jun 2015 15:54:01 -0500 Subject: [PATCH] provider/aws: Correctly default Instance source_dest_check to true --- builtin/providers/aws/resource_aws_instance.go | 2 ++ builtin/providers/aws/resource_aws_instance_test.go | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_instance.go b/builtin/providers/aws/resource_aws_instance.go index 42656214f3..6d7072886b 100644 --- a/builtin/providers/aws/resource_aws_instance.go +++ b/builtin/providers/aws/resource_aws_instance.go @@ -85,6 +85,7 @@ func resourceAwsInstance() *schema.Resource { "source_dest_check": &schema.Schema{ Type: schema.TypeBool, Optional: true, + Default: true, }, "user_data": &schema.Schema{ @@ -641,6 +642,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("subnet_id", instance.SubnetID) } d.Set("ebs_optimized", instance.EBSOptimized) + d.Set("source_dest_check", instance.SourceDestCheck) d.Set("tags", tagsToMap(instance.Tags)) // Determine whether we're referring to security groups with diff --git a/builtin/providers/aws/resource_aws_instance_test.go b/builtin/providers/aws/resource_aws_instance_test.go index 253632a9a3..9e443bd965 100644 --- a/builtin/providers/aws/resource_aws_instance_test.go +++ b/builtin/providers/aws/resource_aws_instance_test.go @@ -653,7 +653,6 @@ resource "aws_instance" "foo" { ami = "ami-4fccb37f" instance_type = "m1.small" subnet_id = "${aws_subnet.foo.id}" - source_dest_check = true } `