Add storage_encrypted as an optional parameter to aws_rds_cluster

This commit is contained in:
Brandon Siegel 2016-03-08 16:48:04 -05:00
parent 5d9637ab1a
commit 8aadf1d56d
1 changed files with 8 additions and 0 deletions

View File

@ -71,6 +71,12 @@ func resourceAwsRDSCluster() *schema.Resource {
Computed: true, Computed: true,
}, },
"storage_encrypted": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
ForceNew: true,
},
"final_snapshot_identifier": &schema.Schema{ "final_snapshot_identifier": &schema.Schema{
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
@ -167,6 +173,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error
Engine: aws.String("aurora"), Engine: aws.String("aurora"),
MasterUserPassword: aws.String(d.Get("master_password").(string)), MasterUserPassword: aws.String(d.Get("master_password").(string)),
MasterUsername: aws.String(d.Get("master_username").(string)), MasterUsername: aws.String(d.Get("master_username").(string)),
StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)),
} }
if v := d.Get("database_name"); v.(string) != "" { if v := d.Get("database_name"); v.(string) != "" {
@ -276,6 +283,7 @@ func resourceAwsRDSClusterRead(d *schema.ResourceData, meta interface{}) error {
d.Set("engine", dbc.Engine) d.Set("engine", dbc.Engine)
d.Set("master_username", dbc.MasterUsername) d.Set("master_username", dbc.MasterUsername)
d.Set("port", dbc.Port) d.Set("port", dbc.Port)
d.Set("storage_encrypted", dbc.StorageEncrypted)
d.Set("backup_retention_period", dbc.BackupRetentionPeriod) d.Set("backup_retention_period", dbc.BackupRetentionPeriod)
d.Set("preferred_backup_window", dbc.PreferredBackupWindow) d.Set("preferred_backup_window", dbc.PreferredBackupWindow)
d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow) d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow)