Skip to content

Commit

Permalink
Merge pull request #309 from alekstorm/aws-db-instance-password
Browse files Browse the repository at this point in the history
Store aws_db_instance.password in tfstate, change to AttrTypeCreate
  • Loading branch information
mitchellh committed Oct 11, 2014
2 parents d8c1ee6 + c7f219a commit 6ddcc2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions builtin/providers/aws/resource_aws_db_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -223,7 +220,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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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.
Expand Down

0 comments on commit 6ddcc2e

Please sign in to comment.