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.
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.
regionRequiredRegion.
stringengineRequiredEngine.
stringengineVersionRequiredEngine Version.
stringinstanceClassRequiredInstance Class.
stringallocatedStorageOptionalAllocated Storage.
int & >=20 & <=65536storageTypeOptionalStorage Type.
"gp2" | "gp3" | "io1" | "io2" | *"gp3""gp3"iopsOptionalIops.
int & >=1000 & <=256000storageThroughputOptionalStorage Throughput.
int & >=125 & <=4000storageEncryptedOptionalStorage Encrypted.
bool | *truetruekmsKeyIdOptionalKms Key ID.
stringmasterUsernameOptionalMaster Username.
stringmasterUserPasswordOptionalMaster User Password.
stringdbSubnetGroupNameOptionalDb Subnet Group Name.
stringparameterGroupNameOptionalParameter Group Name.
stringvpcSecurityGroupIdsOptionalVpc Security Group IDs.
[...string] | *[][]dbClusterIdentifierOptionalDb Cluster Identifier.
stringmultiAZOptionalMulti AZ.
bool | *falsefalsepubliclyAccessibleOptionalPublicly Accessible.
bool | *falsefalsebackupRetentionPeriodOptionalBackup Retention Period.
int & >=0 & <=35 | *77preferredBackupWindowOptionalPreferred Backup Window.
stringpreferredMaintenanceWindowOptionalPreferred Maintenance Window.
stringdeletionProtectionOptionalDeletion Protection.
bool | *falsefalseautoMinorVersionUpgradeOptionalAuto Minor Version Upgrade.
bool | *truetruemonitoringIntervalOptionalMonitoring Interval.
0 | 1 | 5 | 10 | 15 | 30 | 60 | *00monitoringRoleArnOptionalMonitoring Role ARN.
stringperformanceInsightsEnabledOptionalPerformance Insights Enabled.
bool | *falsefalsetagsRequiredTags.
[string]: stringObserved values
Outputs
Praxis records these values after observation. A dependent resource can read one with ${resources.<name>.outputs.<field>}.
dbIdentifierStringdbiResourceIdStringarnStringendpointStringportIntegerengineStringengineVersionStringstatusStringRead 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.
data: existing: {
kind: "RDSInstance"
region: "us-west-2"
filter: {
name: "replace-with-provider-name"
}
}idnameid/name + tagAdopt 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.
praxis import RDSInstance \
--id <provider-identifier> \
--region us-west-2 \
--account production \
--observeCanonical 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
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
}
}