Skip to content

Conversation

@psantus
Copy link
Contributor

@psantus psantus commented Oct 12, 2025

Description

Adds support for RDS Data Query

data "aws_rdsdata_query" "test" {
  depends_on   = [aws_rds_cluster_instance.test]
  resource_arn = aws_rds_cluster.test.arn
  secret_arn   = aws_secretsmanager_secret.test.arn
  sql          = "SELECT :param1 as test_column"
  
  parameters {
    name  = "param1"
    value = "test_value"
  }
}

Relations

Closes #40901
Refs #44472

On top of #44629 ( Add RDS Data Service) - To REVIEWER only the last commit is specific to this branch/PR.

References

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html
https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteStatement.html

Output from Acceptance Testing

% TF_ACC=1 go test ./internal/service/rdsdata/... -v -run="TestAccRDSDataQueryDataSource" -timeout=30m

2025/10/13 00:20:23 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/13 00:20:23 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccRDSDataQueryDataSource_basic
=== PAUSE TestAccRDSDataQueryDataSource_basic
=== RUN   TestAccRDSDataQueryDataSource_withParameters
=== PAUSE TestAccRDSDataQueryDataSource_withParameters
=== CONT  TestAccRDSDataQueryDataSource_basic
=== CONT  TestAccRDSDataQueryDataSource_withParameters
--- PASS: TestAccRDSDataQueryDataSource_basic (828.47s)
--- PASS: TestAccRDSDataQueryDataSource_withParameters (1219.22s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/rdsdata    1224.054s

@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 12, 2025

⚠️ Our automation has detected the following potential issues with your pull request


❌ Changelog Entry Required (Click to expand)

The proposed change requires a changelog entry. Please see the Changelog Process section of the contributing guide for information on the changelog generation process.

Tip: This check is not triggered for draft pull requests, since the pull request number is not known until the pull request is opened and is required to create a changelog entry. Opening a pull request first as a draft, adding the requisite changelog entry file, and then marking the pull request as ready for review will prevent future warnings.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. provider Pertains to the provider itself, rather than any interaction with AWS. linter Pertains to changes to or issues with the various linters. sweeper Pertains to changes to or issues with the sweeper. client-connections Pertains to the AWS Client and service connections. generators Relates to code generators. service/rdsdata Issues and PRs that pertain to the rdsdata service. size/XL Managed by automation to categorize the size of a PR. labels Oct 12, 2025
@psantus psantus force-pushed the f/rdsdata-query-datasource branch 6 times, most recently from 87fb60b to a60118b Compare October 13, 2025 13:12
@psantus psantus marked this pull request as ready for review October 13, 2025 14:52
@psantus psantus requested a review from a team as a code owner October 13, 2025 14:52
@psantus psantus mentioned this pull request Nov 25, 2025
@psantus psantus force-pushed the f/rdsdata-query-datasource branch from a60118b to c267032 Compare November 26, 2025 15:08
@psantus
Copy link
Contributor Author

psantus commented Nov 26, 2025

(rebased)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-connections Pertains to the AWS Client and service connections. documentation Introduces or discusses updates to documentation. generators Relates to code generators. linter Pertains to changes to or issues with the various linters. needs-triage Waiting for first response or review from a maintainer. provider Pertains to the provider itself, rather than any interaction with AWS. service/rdsdata Issues and PRs that pertain to the rdsdata service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. 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.

[New Data Source]: rdsdata/statement

1 participant