Skip to content

Data Source: awsDbInstances

Terraform data source for listing RDS Database Instances.

Example Usage

Basic Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsDbInstances.DataAwsDbInstances(this, "example", {
  filter: [
    {
      name: "db-instance-id",
      values: ["my-database-id"],
    },
  ],
});

Argument Reference

The following arguments are optional:

  • filter - (Optional) Configuration block(s) for filtering. Detailed below.

filter Configuration block

The following arguments are supported by the filter configuration block:

  • name - (Required) Name of the filter field. Valid values can be found in the RDS DescribeDBClusters API Reference.
  • values - (Required) Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • instanceArns - ARNs of the matched RDS instances.
  • instanceIdentifiers - Identifiers of the matched RDS instances.