Skip to content

Commit

Permalink
Merge pull request #1041 from aianchici/master
Browse files Browse the repository at this point in the history
adding storage_encrypted as an optional parameter
  • Loading branch information
phinze committed Mar 2, 2015
2 parents 8e76a02 + 916c64b commit 2450b03
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions builtin/providers/aws/resource_aws_db_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ func resourceAwsDbInstance() *schema.Resource {
ForceNew: true,
},

"storage_encrypted": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
},

"allocated_storage": &schema.Schema{
Type: schema.TypeInt,
Required: true,
Expand Down Expand Up @@ -195,6 +201,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
MasterUserPassword: aws.String(d.Get("password").(string)),
Engine: aws.String(d.Get("engine").(string)),
EngineVersion: aws.String(d.Get("engine_version").(string)),
StorageEncrypted: aws.Boolean(d.Get("storage_encrypted").(bool)),
}

if attr, ok := d.GetOk("storage_type"); ok {
Expand Down Expand Up @@ -320,6 +327,7 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error {
d.Set("address", *v.Endpoint.Port)
d.Set("endpoint", fmt.Sprintf("%s:%d", *v.Endpoint.Address, *v.Endpoint.Port))
d.Set("status", *v.DBInstanceStatus)
d.Set("storage_encrypted", *v.StorageEncrypted)

// Create an empty schema.Set to hold all vpc security group ids
ids := &schema.Set{
Expand Down

0 comments on commit 2450b03

Please sign in to comment.