Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #6163 Directly Set RDS Parameter Group During Restore from snapshot #6200

Merged
merged 1 commit into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions aws/resource_aws_db_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,9 +858,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
}

if attr, ok := d.GetOk("parameter_group_name"); ok {
modifyDbInstanceInput.DBParameterGroupName = aws.String(attr.(string))
requiresModifyDbInstance = true
requiresRebootDbInstance = true
opts.DBParameterGroupName = aws.String(attr.(string))
}

if attr, ok := d.GetOk("password"); ok {
Expand Down
6 changes: 3 additions & 3 deletions aws/resource_aws_rds_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error
opts.VpcSecurityGroupIds = expandStringList(attr.List())
}

if _, ok := d.GetOk("db_cluster_parameter_group_name"); ok {
clusterUpdate = true
if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok {
opts.DBClusterParameterGroupName = aws.String(attr.(string))
}

if _, ok := d.GetOk("backup_retention_period"); ok {
Expand All @@ -490,7 +490,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error
}

if clusterUpdate {
log.Printf("[INFO] RDS Cluster is restoring from snapshot with default db_cluster_parameter_group_name, backup_retention_period and vpc_security_group_ids" +
log.Printf("[INFO] RDS Cluster is restoring from snapshot with default backup_retention_period and vpc_security_group_ids" +
"but custom values should be set, will now update after snapshot is restored!")

d.SetId(identifier)
Expand Down