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

r/aws_rds_integration: add data_filter argument #40816

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Jan 7, 2025

Description

This argument is optional and computed, as AWS sets a default value of include: *.* when omitted.

Relations

Closes #39762

References

Output from Acceptance Testing

% make testacc PKG=rds TESTS=TestAccRDSIntegration_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSIntegration_'  -timeout 360m
2025/01/07 11:18:46 Initializing Terraform AWS Provider...

--- PASS: TestAccRDSIntegration_basic (1775.26s)
--- PASS: TestAccRDSIntegration_disappears (1807.05s)
--- PASS: TestAccRDSIntegration_optional (2079.73s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/rds        2085.031s

Copy link

github-actions bot commented Jan 7, 2025

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/rds Issues and PRs that pertain to the rds service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Jan 7, 2025
This argument is optional and computed, as AWS sets a default value of `include: *.*` when omitted.

```console
% make testacc PKG=rds TESTS=TestAccRDSIntegration_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSIntegration_'  -timeout 360m
2025/01/07 11:18:46 Initializing Terraform AWS Provider...

--- PASS: TestAccRDSIntegration_basic (1775.26s)
--- PASS: TestAccRDSIntegration_disappears (1807.05s)
--- PASS: TestAccRDSIntegration_optional (2079.73s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/rds        2085.031s
```
@jar-b jar-b force-pushed the f-rds_integration-data_filter branch from 129ae13 to c8d6d40 Compare January 7, 2025 20:10
@jar-b jar-b marked this pull request as ready for review January 7, 2025 20:27
@jar-b jar-b requested a review from a team as a code owner January 7, 2025 20:27
@jar-b
Copy link
Member Author

jar-b commented Jan 7, 2025

I also ran a one-time acceptance test to confirm adding this "force new" argument won't cause existing configurations to be re-created. I opted not to include this in the PR because these tests take quite a long time to run and was mostly just a sanity check versus some behavior we'd want to continually check.

func TestAccRDSIntegration_dataFilterUpdate(t *testing.T) {
	if testing.Short() {
		t.Skip("skipping long-running test in short mode")
	}

	ctx := acctest.Context(t)
	var integration awstypes.Integration
	rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)
	resourceName := "aws_rds_integration.test"

	resource.ParallelTest(t, resource.TestCase{
		PreCheck:     func() { acctest.PreCheck(ctx, t) },
		ErrorCheck:   acctest.ErrorCheck(t, names.RDSServiceID),
		CheckDestroy: testAccCheckIntegrationDestroy(ctx),
		Steps: []resource.TestStep{
			{
				ExternalProviders: map[string]resource.ExternalProvider{
					"aws": {
						Source:            "hashicorp/aws",
						VersionConstraint: "5.81.0",
					},
				},
				Config: testAccIntegrationConfig_baseClusterWithInstance(rName),
				Check: resource.ComposeTestCheckFunc(
					waitUntilDBInstanceRebooted(ctx, rName),
				),
			},
			{
				ExternalProviders: map[string]resource.ExternalProvider{
					"aws": {
						Source:            "hashicorp/aws",
						VersionConstraint: "5.81.0",
					},
				},
				Config: testAccIntegrationConfig_basic(rName),
				Check: resource.ComposeAggregateTestCheckFunc(
					testAccCheckIntegrationExists(ctx, resourceName, &integration),
					resource.TestCheckResourceAttr(resourceName, "integration_name", rName),
					// resource.TestCheckResourceAttr(resourceName, "data_filter", "include: *.*"), // shouldn't exist yet
					resource.TestCheckResourceAttrPair(resourceName, "source_arn", "aws_rds_cluster.test", names.AttrARN),
					resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "0"),
					resource.TestCheckResourceAttrPair(resourceName, names.AttrTargetARN, "aws_redshiftserverless_namespace.test", names.AttrARN),
				),
			},
			{
				ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
				Config:                   testAccIntegrationConfig_basic(rName),
				Check: resource.ComposeAggregateTestCheckFunc(
					testAccCheckIntegrationExists(ctx, resourceName, &integration),
					resource.TestCheckResourceAttr(resourceName, "integration_name", rName),
					resource.TestCheckResourceAttr(resourceName, "data_filter", "include: *.*"),
					resource.TestCheckResourceAttrPair(resourceName, "source_arn", "aws_rds_cluster.test", names.AttrARN),
					resource.TestCheckResourceAttr(resourceName, acctest.CtTagsPercent, "0"),
					resource.TestCheckResourceAttrPair(resourceName, names.AttrTargetARN, "aws_redshiftserverless_namespace.test", names.AttrARN),
				),
			},
		},
	})
}
% make testacc PKG=rds TESTS=TestAccRDSIntegration_dataFilterUpdate
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSIntegration_dataFilterUpdate'  -timeout 360m
2025/01/07 15:15:56 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSIntegration_dataFilterUpdate
=== PAUSE TestAccRDSIntegration_dataFilterUpdate
=== CONT  TestAccRDSIntegration_dataFilterUpdate
--- PASS: TestAccRDSIntegration_dataFilterUpdate (1998.08s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/rds        2003.400s

Copy link
Contributor

@nam054 nam054 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

> make testacc PKG=rds TESTS=TestAccRDSIntegration_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSIntegration_'  -timeout 360m
2025/01/08 12:38:36 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSIntegration_basic
=== PAUSE TestAccRDSIntegration_basic
=== RUN   TestAccRDSIntegration_disappears
=== PAUSE TestAccRDSIntegration_disappears
=== RUN   TestAccRDSIntegration_optional
=== PAUSE TestAccRDSIntegration_optional
=== CONT  TestAccRDSIntegration_basic
=== CONT  TestAccRDSIntegration_optional
=== CONT  TestAccRDSIntegration_disappears
--- PASS: TestAccRDSIntegration_disappears (1903.39s)
--- PASS: TestAccRDSIntegration_basic (1913.19s)
--- PASS: TestAccRDSIntegration_optional (2105.42s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	2112.083s

@jar-b jar-b merged commit b10605a into main Jan 9, 2025
50 checks passed
@jar-b jar-b deleted the f-rds_integration-data_filter branch January 9, 2025 14:47
@github-actions github-actions bot added this to the v5.83.0 milestone Jan 9, 2025
terraform-aws-provider bot pushed a commit that referenced this pull request Jan 9, 2025
@trejas
Copy link

trejas commented Jan 9, 2025

@jar-b - We are waiting on this feature for a blocked deployment. Just curious, how long after the milestone due dates does the team usually release the associated provider version?

I see that 5.83.0 milesetone is due today.

Copy link

github-actions bot commented Jan 9, 2025

This functionality has been released in v5.83.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. service/rds Issues and PRs that pertain to the rds service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: aws_rds_integration lacks the DataFilter parameter
3 participants