Skip to content

Data Source: awsDbInstance

Use this data source to get information about an RDS instance

Example 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.dataAwsDbInstance.DataAwsDbInstance(this, "database", {
  dbInstanceIdentifier: "my-test-database",
});

Argument Reference

The following arguments are supported:

  • dbInstanceIdentifier - (Required) Name of the RDS instance

Attributes Reference

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

  • address - Hostname of the RDS instance. See also endpoint and port.
  • allocatedStorage - Allocated storage size specified in gigabytes.
  • autoMinorVersionUpgrade - Indicates that minor version patches are applied automatically.
  • availabilityZone - Name of the Availability Zone the DB instance is located in.
  • backupRetentionPeriod - Specifies the number of days for which automatic DB snapshots are retained.
  • dbClusterIdentifier - If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.
  • dbInstanceArn - ARN for the DB instance.
  • dbInstanceClass - Contains the name of the compute and memory capacity class of the DB instance.
  • dbName - Contains the name of the initial database of this instance that was provided at create time, if one was specified when the DB instance was created. This same name is returned for the life of the DB instance.
  • dbParameterGroups - Provides the list of DB parameter groups applied to this DB instance.
  • dbSecurityGroups - Provides List of DB security groups associated to this DB instance.
  • dbSubnetGroup - Name of the subnet group associated with the DB instance.
  • dbInstancePort - Port that the DB instance listens on.
  • enabledCloudwatchLogsExports - List of log types to export to cloudwatch.
  • endpoint - Connection endpoint in address:port format.
  • engine - Provides the name of the database engine to be used for this DB instance.
  • engineVersion - Database engine version.
  • hostedZoneId - Canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record).
  • iops - Provisioned IOPS (I/O operations per second) value.
  • kmsKeyId - If StorageEncrypted is true, the KMS key identifier for the encrypted DB instance.
  • licenseModel - License model information for this DB instance.
  • masterUsername - Contains the master username for the DB instance.
  • monitoringInterval - Interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.
  • monitoringRoleArn - ARN for the IAM role that permits RDS to send Enhanced Monitoring metrics to CloudWatch Logs.
  • multiAz - If the DB instance is a Multi-AZ deployment.
  • networkType - Network type of the DB instance.
  • optionGroupMemberships - Provides the list of option group memberships for this DB instance.
  • port - Database port.
  • preferredBackupWindow - Specifies the daily time range during which automated backups are created.
  • preferredMaintenanceWindow - Specifies the weekly time range during which system maintenance can occur in UTC.
  • publiclyAccessible - Accessibility options for the DB instance.
  • resourceId - RDS Resource ID of this instance.
  • storageEncrypted - Whether the DB instance is encrypted.
  • storageThroughput - Storage throughput value for the DB instance.
  • storageType - Storage type associated with DB instance.
  • timezone - Time zone of the DB instance.
  • vpcSecurityGroups - Provides a list of VPC security group elements that the DB instance belongs to.
  • replicateSourceDb - Identifier of the source DB that this is a replica of.
  • caCertIdentifier - Identifier of the CA certificate for the DB instance.