From b6738f13c1844b04467bb829622671af156cf948 Mon Sep 17 00:00:00 2001 From: Brandon Rochon Date: Thu, 12 Nov 2015 13:33:27 -0800 Subject: [PATCH 1/2] Issue #3894 RDS publicly_accessible param shouldn't force new resource Change-Id: I833f9e07f3fc1f6ee475673ad978b3982f0b6273 --- builtin/providers/aws/resource_aws_db_instance.go | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index d00dce597..4f0a27f8a 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -146,7 +146,6 @@ func resourceAwsDbInstance() *schema.Resource { "publicly_accessible": &schema.Schema{ Type: schema.TypeBool, Optional: true, - ForceNew: true, }, "vpc_security_group_ids": &schema.Schema{ From 6875e9aaec0f79f2437874c20f2369b877257804 Mon Sep 17 00:00:00 2001 From: Brandon Rochon Date: Mon, 16 Nov 2015 17:47:35 -0800 Subject: [PATCH 2/2] Issue #3894 RDS publicly_accessible param shouldn't force new resource Change-Id: I0a10e050ca1c4f2dde5e04f237de6115723522d8 --- builtin/providers/aws/resource_aws_db_instance.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index 4f0a27f8a..bd566b8a5 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -146,6 +146,7 @@ func resourceAwsDbInstance() *schema.Resource { "publicly_accessible": &schema.Schema{ Type: schema.TypeBool, Optional: true, + Computed: true, }, "vpc_security_group_ids": &schema.Schema{ @@ -704,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))