Skip to content

Commit

Permalink
provider/aws: Set the DBName when restoring from a snapshot (#10664)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninir authored and stack72 committed Dec 12, 2016
1 parent a2db4ad commit 3f5e12f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builtin/providers/aws/resource_aws_db_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
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 {
opts.AvailabilityZone = aws.String(attr.(string))
}
Expand Down

0 comments on commit 3f5e12f

Please sign in to comment.