diff --git a/builtin/providers/aws/resource_aws_subnet.go b/builtin/providers/aws/resource_aws_subnet.go index 4922b035f699..38aea8e1d26a 100644 --- a/builtin/providers/aws/resource_aws_subnet.go +++ b/builtin/providers/aws/resource_aws_subnet.go @@ -42,7 +42,7 @@ func resourceAwsSubnet() *schema.Resource { "map_public_ip_on_launch": &schema.Schema{ Type: schema.TypeBool, Optional: true, - Computed: true, + Default: false, }, "tags": tagsSchema(), @@ -133,8 +133,10 @@ func resourceAwsSubnetUpdate(d *schema.ResourceData, meta interface{}) error { if d.HasChange("map_public_ip_on_launch") { modifyOpts := &ec2.ModifySubnetAttributeRequest{ - SubnetID: aws.String(d.Id()), - MapPublicIPOnLaunch: &ec2.AttributeBooleanValue{aws.Boolean(true)}, + SubnetID: aws.String(d.Id()), + MapPublicIPOnLaunch: &ec2.AttributeBooleanValue{ + aws.Boolean(d.Get("map_public_ip_on_launch").(bool)), + }, } log.Printf("[DEBUG] Subnet modify attributes: %#v", modifyOpts)