From c7f219a781bb83b4179c349487b1ff7ef0577184 Mon Sep 17 00:00:00 2001 From: Alek Storm Date: Thu, 18 Sep 2014 13:21:08 -0700 Subject: [PATCH] Store aws_db_instance.password in tfstate, change to AttrTypeCreate --- builtin/providers/aws/resource_aws_db_instance.go | 5 +---- .../source/docs/providers/aws/r/db_instance.html.markdown | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index 6e1afa0eb..d7b055337 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -100,9 +100,6 @@ func resource_aws_db_instance_create( opts.EngineVersion = rs.Attributes["engine_version"] opts.Engine = rs.Attributes["engine"] - // Don't keep the password around in the state - delete(rs.Attributes, "password") - log.Printf("[DEBUG] DB Instance create configuration: %#v", opts) _, err = conn.CreateDBInstance(&opts) if err != nil { @@ -221,7 +218,7 @@ func resource_aws_db_instance_diff( "maintenance_window": diff.AttrTypeCreate, "multi_az": diff.AttrTypeCreate, "name": diff.AttrTypeCreate, - "password": diff.AttrTypeUpdate, + "password": diff.AttrTypeCreate, "port": diff.AttrTypeCreate, "publicly_accessible": diff.AttrTypeCreate, "username": diff.AttrTypeCreate, 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 2195a8a15..d87c03363 100644 --- a/website/source/docs/providers/aws/r/db_instance.html.markdown +++ b/website/source/docs/providers/aws/r/db_instance.html.markdown @@ -35,7 +35,8 @@ The following arguments are supported: * `instance_class` - (Required) The instance type of the RDS instance. * `final_snapshot_identifier` - (Optional) The name of your final DB snapshot. * `name` - (Required) The DB name to create. -* `password` - (Required) Password for the master DB user. +* `password` - (Required) Password for the master DB user. Note that this will be stored + in the state file. * `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.