Merge pull request #13140 from hashicorp/b-rds-snapshot-restore-db-name
provider/aws: Don't set DBName on `aws_db_instance` from snapshot
This commit is contained in:
commit
43242bbeae
|
@ -407,8 +407,15 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
|
|||
}
|
||||
|
||||
if attr, ok := d.GetOk("name"); ok {
|
||||
// "Note: This parameter [DBName] doesn't apply to the MySQL, PostgreSQL, or MariaDB engines."
|
||||
// https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromDBSnapshot.html
|
||||
switch strings.ToLower(d.Get("engine").(string)) {
|
||||
case "mysql", "postgres", "mariadb":
|
||||
// skip
|
||||
default:
|
||||
opts.DBName = aws.String(attr.(string))
|
||||
}
|
||||
}
|
||||
|
||||
if attr, ok := d.GetOk("availability_zone"); ok {
|
||||
opts.AvailabilityZone = aws.String(attr.(string))
|
||||
|
|
Loading…
Reference in New Issue