diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index d00dce597..bd566b8a5 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -146,7 +146,7 @@ func resourceAwsDbInstance() *schema.Resource { "publicly_accessible": &schema.Schema{ Type: schema.TypeBool, Optional: true, - ForceNew: true, + Computed: true, }, "vpc_security_group_ids": &schema.Schema{ @@ -705,6 +705,11 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error req.MultiAZ = aws.Bool(d.Get("multi_az").(bool)) requestUpdate = true } + if d.HasChange("publicly_accessible") { + d.SetPartial("publicly_accessible") + req.PubliclyAccessible = aws.Bool(d.Get("publicly_accessible").(bool)) + requestUpdate = true + } if d.HasChange("storage_type") { d.SetPartial("storage_type") req.StorageType = aws.String(d.Get("storage_type").(string))