diff --git a/builtin/providers/aws/resource_aws_vpc.go b/builtin/providers/aws/resource_aws_vpc.go index e3c2adb7ce..89afe67113 100644 --- a/builtin/providers/aws/resource_aws_vpc.go +++ b/builtin/providers/aws/resource_aws_vpc.go @@ -46,7 +46,7 @@ func resourceAwsVpc() *schema.Resource { "enable_dns_support": { Type: schema.TypeBool, Optional: true, - Computed: true, + Default: true, }, "enable_classiclink": { @@ -251,13 +251,13 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { } log.Printf( - "[INFO] Modifying enable_dns_support vpc attribute for %s: %#v", + "[INFO] Modifying enable_dns_hostnames vpc attribute for %s: %s", d.Id(), modifyOpts) if _, err := conn.ModifyVpcAttribute(modifyOpts); err != nil { return err } - d.SetPartial("enable_dns_support") + d.SetPartial("enable_dns_hostnames") } _, hasEnableDnsSupportOption := d.GetOk("enable_dns_support") @@ -272,7 +272,7 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { } log.Printf( - "[INFO] Modifying enable_dns_support vpc attribute for %s: %#v", + "[INFO] Modifying enable_dns_support vpc attribute for %s: %s", d.Id(), modifyOpts) if _, err := conn.ModifyVpcAttribute(modifyOpts); err != nil { return err diff --git a/builtin/providers/aws/resource_aws_vpc_test.go b/builtin/providers/aws/resource_aws_vpc_test.go index 9b9826a53f..29fda784b8 100644 --- a/builtin/providers/aws/resource_aws_vpc_test.go +++ b/builtin/providers/aws/resource_aws_vpc_test.go @@ -28,6 +28,8 @@ func TestAccAWSVpc_basic(t *testing.T) { "aws_vpc.foo", "cidr_block", "10.1.0.0/16"), resource.TestCheckResourceAttrSet( "aws_vpc.foo", "default_route_table_id"), + resource.TestCheckResourceAttr( + "aws_vpc.foo", "enable_dns_support", "true"), ), }, }, @@ -298,7 +300,7 @@ resource "aws_vpc" "bar" { const testAccVpcConfig_DisabledDnsSupport = ` provider "aws" { - region = "eu-central-1" + region = "us-west-2" } resource "aws_vpc" "bar" {