provider/aws: Set the DBName when restoring from a snapshot (#10664)

This commit is contained in:
Ninir 2016-12-12 13:56:56 +01:00 committed by Paul Stack
parent a2db4ad4bb
commit 3f5e12ff7e
1 changed files with 4 additions and 0 deletions

View File

@ -391,6 +391,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)),
} }
if attr, ok := d.GetOk("name"); ok {
opts.DBName = aws.String(attr.(string))
}
if attr, ok := d.GetOk("availability_zone"); ok { if attr, ok := d.GetOk("availability_zone"); ok {
opts.AvailabilityZone = aws.String(attr.(string)) opts.AvailabilityZone = aws.String(attr.(string))
} }