From 6de8f9d180a4bfba8ae551c4ba3e6b09357840ef Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Thu, 21 May 2015 09:49:46 -0500 Subject: [PATCH] provider/aws: RDS Read Replica cleanups remove typos, debugging, and try spelling things correctly --- builtin/providers/aws/resource_aws_db_instance.go | 7 ------- builtin/providers/aws/resource_aws_db_instance_test.go | 2 +- .../source/docs/providers/aws/r/db_instance.html.markdown | 4 ++-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index 190118098..c832c67bb 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -445,11 +445,6 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("[DEBUG] Error setting replicas attribute: %#v, error: %#v", replicas, err) } - if v.ReadReplicaSourceDBInstanceIdentifier != nil { - log.Printf("\n\n------\nread replica instance identifier: %#v", *v.ReadReplicaSourceDBInstanceIdentifier) - } else { - log.Printf("\n\n------\nno replica identifier") - } d.Set("replicate_source_db", v.ReadReplicaSourceDBInstanceIdentifier) return nil @@ -493,7 +488,6 @@ func resourceAwsDbInstanceDelete(d *schema.ResourceData, meta interface{}) error } func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error { - log.Printf("\n\n-------- ENTER UPDATE -------\n\n") conn := meta.(*AWSClient).rdsconn d.Partial(true) @@ -622,7 +616,6 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error } } d.Partial(false) - log.Printf("\n\n-------- EXIT UPDATE -------\n\n") return resourceAwsDbInstanceRead(d, meta) } diff --git a/builtin/providers/aws/resource_aws_db_instance_test.go b/builtin/providers/aws/resource_aws_db_instance_test.go index 707e65b4e..b6d31f75e 100644 --- a/builtin/providers/aws/resource_aws_db_instance_test.go +++ b/builtin/providers/aws/resource_aws_db_instance_test.go @@ -209,7 +209,7 @@ func testAccReplicaInstanceConfig(val int) string { resource "aws_db_instance" "replica" { identifier = "tf-replica-db-%d" backup_retention_period = 0 - replicate_source_db = "${aws_db_instance.bar.identifier}" + replicate_source_db = "${aws_db_instance.bar.identifier}" allocated_storage = "${aws_db_instance.bar.allocated_storage}" engine = "${aws_db_instance.bar.engine}" engine_version = "${aws_db_instance.bar.engine_version}" diff --git a/website/source/docs/providers/aws/r/db_instance.html.markdown b/website/source/docs/providers/aws/r/db_instance.html.markdown index c536f8ee9..c91670526 100644 --- a/website/source/docs/providers/aws/r/db_instance.html.markdown +++ b/website/source/docs/providers/aws/r/db_instance.html.markdown @@ -49,7 +49,7 @@ The following arguments are supported: * `username` - (Required) Username for the master DB user. * `availability_zone` - (Optional) The AZ for the RDS instance. * `backup_retention_period` - (Optional) The days to retain backups for. Must be -`1` or greater to be a source for a [Read Replicate][1]. +`1` or greater to be a source for a [Read Replica][1]. * `backup_window` - (Optional) The backup window. * `iops` - (Optional) The amount of provisioned IOPS. Setting this implies a storage_type of "io1". @@ -74,7 +74,7 @@ database, and to use this value as the source database. This correlates to the more information on using Replication. -~> **NOTE:** Removing the `relicate_source` attribute from an existing RDS +~> **NOTE:** Removing the `replicate_source` attribute from an existing RDS Replicate database managed by Terraform will promote the database to a fully standalone database.