Skip to content

Commit 3f5e12f

Browse files
Ninirstack72
authored andcommitted
provider/aws: Set the DBName when restoring from a snapshot (#10664)
1 parent a2db4ad commit 3f5e12f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

builtin/providers/aws/resource_aws_db_instance.go

+4
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
391391
CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)),
392392
}
393393

394+
if attr, ok := d.GetOk("name"); ok {
395+
opts.DBName = aws.String(attr.(string))
396+
}
397+
394398
if attr, ok := d.GetOk("availability_zone"); ok {
395399
opts.AvailabilityZone = aws.String(attr.(string))
396400
}

0 commit comments

Comments
 (0)