Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding storage_encrypted as an optional parameter #1041

Merged
merged 1 commit into from
Mar 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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