Merge pull request #4155 from hashicorp/b-aws-db-replica-storage
providers/aws: Update DB Replica to honor storage type
This commit is contained in:
commit
078280f1ea
|
@ -290,6 +290,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
|
|||
opts.AvailabilityZone = aws.String(attr.(string))
|
||||
}
|
||||
|
||||
if attr, ok := d.GetOk("storage_type"); ok {
|
||||
opts.StorageType = aws.String(attr.(string))
|
||||
}
|
||||
|
||||
if attr, ok := d.GetOk("publicly_accessible"); ok {
|
||||
opts.PubliclyAccessible = aws.Bool(attr.(bool))
|
||||
}
|
||||
|
@ -297,6 +301,8 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
|
|||
if attr, ok := d.GetOk("db_subnet_group_name"); ok {
|
||||
opts.DBSubnetGroupName = aws.String(attr.(string))
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] DB Instance Replica create configuration: %#v", opts)
|
||||
_, err := conn.CreateDBInstanceReadReplica(&opts)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error creating DB Instance: %s", err)
|
||||
|
|
Loading…
Reference in New Issue