Skip to content

Introducting new aws_rds_db_global_cluster table#2707

Open
ppapishe wants to merge 4 commits intoturbot:mainfrom
ppapishe:aws_rds_db_global_cluster
Open

Introducting new aws_rds_db_global_cluster table#2707
ppapishe wants to merge 4 commits intoturbot:mainfrom
ppapishe:aws_rds_db_global_cluster

Conversation

@ppapishe
Copy link

@ppapishe ppapishe commented Feb 17, 2026

Integration test logs

Logs
> .inspect aws_rds_db_global_cluster
+----------------------------+---------+-----------------------------------------------------------------------------------+
| column                     | type    | description                                                                       |
+----------------------------+---------+-----------------------------------------------------------------------------------+
| _ctx                       | jsonb   | Steampipe context in JSON form.                                                   |
| account_id                 | text    | The AWS Account ID in which the resource is located.                              |
| akas                       | jsonb   | Array of globally unique identifier strings (also known as) for the resource.     |
| database_name              | text    | The default database name within the global database cluster.                     |
| deletion_protection        | boolean | The deletion protection setting for the global database cluster.                  |
| endpoint                   | text    | The writer endpoint for the primary DB cluster in this global database cluster.   |
| engine                     | text    | The Aurora database engine used by the global database cluster.                   |
| engine_version             | text    | Indicates the database engine version.                                            |
| failover_state             | jsonb   | Properties for the current state of an in-process or pending switchover/failover. |
| global_cluster_arn         | text    | The Amazon Resource Name (ARN) for the global database cluster.                   |
| global_cluster_identifier  | text    | Contains a user-supplied global database cluster identifier.                      |
| global_cluster_members     | jsonb   | The list of primary and secondary clusters within the global database cluster.    |
| global_cluster_resource_id | text    | The AWS Region-unique, immutable identifier for the global database cluster.      |
| partition                  | text    | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).  |
| region                     | text    | The AWS Region in which the resource is located.                                  |
| sp_connection_name         | text    | Steampipe connection name.                                                        |
| sp_ctx                     | jsonb   | Steampipe context in JSON form.                                                   |
| status                     | text    | Specifies the current state of this global database cluster.                      |
| storage_encrypted          | boolean | The storage encryption setting for the global database cluster.                   |
| tags                       | jsonb   | A map of tags for the resource.                                                   |
| tags_src                   | jsonb   | A list of tags attached to the global database cluster.                           |
| title                      | text    | Title of the resource.                                                            |
+----------------------------+---------+-----------------------------------------------------------------------------------+
Add passing integration test logs here

Example query results

Results
Add example SQL query results here (please include the input queries as well)

@misraved misraved requested review from Copilot and misraved February 18, 2026 15:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Steampipe table for querying AWS RDS Global Clusters, along with documentation and plugin registration.

Changes:

  • Added aws_rds_db_global_cluster table implementation (list/get, tags, endpoint).
  • Registered the new table in the AWS plugin.
  • Added table documentation with example queries (Postgres + SQLite).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
docs/tables/aws_rds_db_global_cluster.md Adds user-facing docs and example queries for the new table.
aws/table_aws_rds_db_global_cluster.go Implements the new table, including list/get and hydrators for tags/endpoint.
aws/plugin.go Registers the new table in the plugin table map.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +20
func tableAwsRDSGlobalCluster(_ context.Context) *plugin.Table {
return &plugin.Table{
Name: "aws_rds_db_global_cluster",
Description: "AWS RDS Global Cluster",
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The table factory function name is inconsistent with the existing RDS DB table naming pattern (e.g., tableAwsRDSDBCluster/tableAwsRDSDBOptionGroup). To match the convention and improve discoverability, rename this to tableAwsRDSDBGlobalCluster and update the reference in aws/plugin.go.

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +50
Name: "global_cluster_arn",
Description: "The Amazon Resource Name (ARN) for the global database cluster.",
Type: proto.ColumnType_STRING,
},
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

Most tables in this plugin expose the primary ARN as a column named arn (including other RDS tables). Exposing it here as global_cluster_arn makes cross-table querying less consistent. Consider renaming this column to arn (keeping akas as-is) and updating any docs/examples accordingly before release.

Copilot uses AI. Check for mistakes.
@misraved
Copy link
Contributor

@ppapishe could you please take a look at the copilot review comments?

Copy link
Contributor

@misraved misraved left a comment

Choose a reason for hiding this comment

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

Code Review

BLOCKER: Duplicate rows across regions

The table uses SupportedRegionMatrix(AWS_RDS_SERVICE_ID) with awsRegionalColumns(), but DescribeGlobalClusters returns the same global clusters from every region. This will produce duplicate rows for every configured region.

The table should either:

  • Remove the region matrix and use awsAccountColumns() (query from a single default region), or
  • Use awsGlobalRegionColumns() with a single-region matrix (see aws_budgets_budget or aws_organizations_account for patterns)

This must be fixed before merge — without it the table is fundamentally broken for multi-region configurations.


SUGGESTION: Redundant transform on endpoint column

Transform: transform.FromField("Endpoint"),

The plugin's default FromCamel() transform already handles this. Other columns in the same table (e.g., status, engine) correctly rely on the auto-transform. Remove for consistency.

SUGGESTION: Add optional KeyColumns for List

The DescribeGlobalClusters API supports a GlobalClusterIdentifier filter. Adding it as an optional KeyColumn would allow filter pushdown:

KeyColumns: []*plugin.KeyColumn{
    {Name: "global_cluster_identifier", Require: plugin.Optional},
},

SUGGESTION: PR body has placeholder text

The integration test section says "Add passing integration test logs here" and the example query section says "Add example SQL query results here". Actual test evidence should be included before merge.


NIT: Typo in PR title

"Introducting" → "Introducing"

NIT: Extra blank line before tags_src column

Minor formatting inconsistency in the column definitions.


Positives

  • Correct pagination with WaitForListRateLimit + RowsRemaining check
  • Proper tag hydrate pattern (tags_src raw + tags transformed)
  • Good documentation with JSONB cross-join examples (both PostgreSQL and SQLite)
  • Correct plugin.go registration in alphabetical order
  • Proper error handling with shouldIgnoreErrors([]string{"GlobalClusterNotFoundFault"})

🤖 Generated with Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants