Data Source: aws_db_instances

Terraform data source for listing RDS Database Instances.

Example Usage

Basic Usage

data "aws_db_instances" "example" {
  filter {
    name   = "db-instance-id"
    values = ["my-database-id"]
  }
}

Using tags

data "aws_db_instances" "example" {
  tags = {
    Env = "test"
  }
}

Argument Reference

The following arguments are optional:

filter Configuration block

The filter configuration block supports the following arguments:

Attribute Reference

This data source exports the following attributes in addition to the arguments above: