provider/aws: Updates for RDS
This commit is contained in:
parent
cb49c8da3d
commit
d793c6dbff
|
@ -255,6 +255,12 @@ func resourceAwsDbInstance() *schema.Resource {
|
|||
Optional: true,
|
||||
},
|
||||
|
||||
"allow_major_version_upgrade": &schema.Schema{
|
||||
Type: schema.TypeBool,
|
||||
Computed: false,
|
||||
Optional: true,
|
||||
},
|
||||
|
||||
"tags": tagsSchema(),
|
||||
},
|
||||
}
|
||||
|
@ -616,6 +622,11 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error
|
|||
req.AllocatedStorage = aws.Int64(int64(d.Get("allocated_storage").(int)))
|
||||
requestUpdate = true
|
||||
}
|
||||
if d.HasChange("allow_major_version_upgrade") {
|
||||
d.SetPartial("allow_major_version_upgrade")
|
||||
req.AllowMajorVersionUpgrade = aws.Bool(d.Get("allow_major_version_upgrade").(bool))
|
||||
requestUpdate = true
|
||||
}
|
||||
if d.HasChange("backup_retention_period") {
|
||||
d.SetPartial("backup_retention_period")
|
||||
req.BackupRetentionPeriod = aws.Int64(int64(d.Get("backup_retention_period").(int)))
|
||||
|
@ -728,6 +739,7 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error
|
|||
}
|
||||
}
|
||||
d.Partial(false)
|
||||
|
||||
return resourceAwsDbInstanceRead(d, meta)
|
||||
}
|
||||
|
||||
|
@ -742,7 +754,6 @@ func resourceAwsDbInstanceRetrieve(
|
|||
log.Printf("[DEBUG] DB Instance describe configuration: %#v", opts)
|
||||
|
||||
resp, err := conn.DescribeDBInstances(&opts)
|
||||
|
||||
if err != nil {
|
||||
dbinstanceerr, ok := err.(awserr.Error)
|
||||
if ok && dbinstanceerr.Code() == "DBInstanceNotFound" {
|
||||
|
|
Loading…
Reference in New Issue