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,7 +407,14 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
|
|||
}
|
||||
|
||||
if attr, ok := d.GetOk("name"); ok {
|
||||
opts.DBName = aws.String(attr.(string))
|
||||
// "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 {
|
||||
|
|
Loading…
Reference in New Issue