Skip to content
Open
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
3 changes: 2 additions & 1 deletion internal/service/rds/blue_green.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (h *instanceHandler) precondition(ctx context.Context, d *schema.ResourceDa
return nil
}

func (h *instanceHandler) createBlueGreenInput(d *schema.ResourceData) *rds.CreateBlueGreenDeploymentInput {
func (h *instanceHandler) createBlueGreenInput(ctx context.Context, d *schema.ResourceData) *rds.CreateBlueGreenDeploymentInput {
input := &rds.CreateBlueGreenDeploymentInput{
BlueGreenDeploymentName: aws.String(d.Get(names.AttrIdentifier).(string)),
Source: aws.String(d.Get(names.AttrARN).(string)),
Expand All @@ -140,6 +140,7 @@ func (h *instanceHandler) createBlueGreenInput(d *schema.ResourceData) *rds.Crea
if d.HasChange(names.AttrParameterGroupName) {
input.TargetDBParameterGroupName = aws.String(d.Get(names.AttrParameterGroupName).(string))
}
input.Tags = getTagsIn(ctx)

return input
}
Expand Down
2 changes: 1 addition & 1 deletion internal/service/rds/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ func resourceInstanceUpdate(ctx context.Context, d *schema.ResourceData, meta an
return sdkdiag.AppendErrorf(diags, "updating RDS DB Instance (%s): %s", d.Get(names.AttrIdentifier).(string), err)
}

createIn := handler.createBlueGreenInput(d)
createIn := handler.createBlueGreenInput(ctx, d)

log.Printf("[DEBUG] Updating RDS DB Instance (%s): Creating Blue/Green Deployment", d.Get(names.AttrIdentifier).(string))

Expand Down
8 changes: 8 additions & 0 deletions internal/service/rds/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14073,6 +14073,14 @@ func testAccInstanceConfig_BlueGreenDeployment_engineVersion(rName string, updat
return acctest.ConfigCompose(
acctest.ConfigRandomPassword(),
fmt.Sprintf(`

Check failure on line 14075 in internal/service/rds/instance_test.go

View workflow job for this annotation

GitHub Actions / providerlint

AT004: provider declaration should be omitted
provider "aws" {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a test failing because I added the provider here, for me this was the way to check if tags were added. But the process isn't automated anyway, so maybe I just remove it again?

default_tags {
tags = {
Terraform = "True"
}
}
}

resource "aws_db_instance" "test" {
identifier = %[1]q
allocated_storage = 10
Expand Down
Loading