RDS · Data

RDSInstance

Manage relational database instances and lifecycle settings.

Generic driverUniform lifecycle
Scope
Regional
Spec fields
27
Outputs
8
Lookup
Supported

Resource definition

What this resource looks like

This is the CUE shape a Praxis template uses to declare a RDSInstance. The resource key is local to the template; metadata.name supplies its stable Praxis identity.

CUE example
resources: database: {
  apiVersion: "praxis.io/alpha"
  kind: "RDSInstance"
  metadata: {name: "payments-primary", labels: {}}
  spec: {
    region: "us-west-2"
    engine: "postgres"
    engineVersion: "16.3"
    instanceClass: "db.t3.small"
    allocatedStorage: 20
    masterUsername: "payments"
    masterUserPassword: "ssm:///praxis/payments/db-password"
    tags: environment: "prod"
  }
  lifecycle: preventDestroy: true
}

Desired state

Configuration

The spec block accepts 27 fields. 5 are required by the schema; fields with defaults can be omitted.

regionRequired

Region.

string
String
engineRequired

Engine.

string
String
engineVersionRequired

Engine Version.

string
String
instanceClassRequired

Instance Class.

string
String
allocatedStorageOptional

Allocated Storage.

int & >=20 & <=65536
Integer
storageTypeOptional

Storage Type.

"gp2" | "gp3" | "io1" | "io2" | *"gp3"
EnumDefault "gp3"
iopsOptional

Iops.

int & >=1000 & <=256000
Integer
storageThroughputOptional

Storage Throughput.

int & >=125 & <=4000
Integer
storageEncryptedOptional

Storage Encrypted.

bool | *true
BooleanDefault true
kmsKeyIdOptional

Kms Key ID.

string
String
masterUsernameOptional

Master Username.

string
String
masterUserPasswordOptional

Master User Password.

string
String
dbSubnetGroupNameOptional

Db Subnet Group Name.

string
String
parameterGroupNameOptional

Parameter Group Name.

string
String
vpcSecurityGroupIdsOptional

Vpc Security Group IDs.

[...string] | *[]
ListDefault []
dbClusterIdentifierOptional

Db Cluster Identifier.

string
String
multiAZOptional

Multi AZ.

bool | *false
BooleanDefault false
publiclyAccessibleOptional

Publicly Accessible.

bool | *false
BooleanDefault false
backupRetentionPeriodOptional

Backup Retention Period.

int & >=0 & <=35 | *7
IntegerDefault 7
preferredBackupWindowOptional

Preferred Backup Window.

string
String
preferredMaintenanceWindowOptional

Preferred Maintenance Window.

string
String
deletionProtectionOptional

Deletion Protection.

bool | *false
BooleanDefault false
autoMinorVersionUpgradeOptional

Auto Minor Version Upgrade.

bool | *true
BooleanDefault true
monitoringIntervalOptional

Monitoring Interval.

0 | 1 | 5 | 10 | 15 | 30 | 60 | *0
IntegerDefault 0
monitoringRoleArnOptional

Monitoring Role ARN.

string
String
performanceInsightsEnabledOptional

Performance Insights Enabled.

bool | *false
BooleanDefault false
tagsRequired

Tags.

[string]: string
Map

Observed values

Outputs

Praxis records these values after observation. A dependent resource can read one with ${resources.<name>.outputs.<field>}.

dbIdentifierString
dbiResourceIdString
arnString
endpointString
portInteger
engineString
engineVersionString
statusString

Read without ownership

Data-source lookup

A data block reads an existing RDSInstance and exposes its outputs without storing lifecycle state. The generic filter surface accepts id, name, and tag; supported combinations depend on the AWS identity used by this resource.

CUE data source
data: existing: {
  kind: "RDSInstance"
  region: "us-west-2"
  filter: {
    name: "replace-with-provider-name"
  }
}
Documented selectorsidnameid/name + tag

Understand data sources and filters →

Adopt existing infrastructure

Import

Import persists Praxis state for an existing AWS resource. For this kind, supply: DB instance identifier and region. The example starts in observed mode so Praxis reports drift without correcting it.

CLI
praxis import RDSInstance \
  --id <provider-identifier> \
  --region us-west-2 \
  --account production \
  --observe

Choose managed or observed ownership →

Canonical contract

Complete CUE schema

The field guide above is derived from this definition. The schema remains the source of truth for accepted values, defaults, validation constraints, and outputs in the current alpha revision.

Show the complete schema
schemas/aws/rds/instance.cue
package rds

#RDSInstance: {
	apiVersion: "praxis.io/alpha"
	kind:       "RDSInstance"

	metadata: {
		name: string & =~"^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$"
		labels: [string]: string
	}

	spec: {
		region:              string
		engine:              string
		engineVersion:       string
		instanceClass:       string
		allocatedStorage?:   int & >=20 & <=65536
		storageType:         "gp2" | "gp3" | "io1" | "io2" | *"gp3"
		iops?:               int & >=1000 & <=256000
		storageThroughput?:  int & >=125 & <=4000
		storageEncrypted:    bool | *true
		kmsKeyId?:           string
		masterUsername?:     string
		masterUserPassword?: string
		dbSubnetGroupName?:  string
		parameterGroupName?: string
		vpcSecurityGroupIds: [...string] | *[]
		dbClusterIdentifier?:        string
		multiAZ:                     bool | *false
		publiclyAccessible:          bool | *false
		backupRetentionPeriod:       int & >=0 & <=35 | *7
		preferredBackupWindow?:      string
		preferredMaintenanceWindow?: string
		deletionProtection:          bool | *false
		autoMinorVersionUpgrade:     bool | *true
		monitoringInterval:          0 | 1 | 5 | 10 | 15 | 30 | 60 | *0
		monitoringRoleArn?:          string
		performanceInsightsEnabled:  bool | *false
		tags: [string]: string
	}

	outputs?: {
		dbIdentifier:  string
		dbiResourceId: string
		arn:           string
		endpoint:      string
		port:          int
		engine:        string
		engineVersion: string
		status:        string
	}
}

View this schema on GitHub →