Resource definition
What this resource looks like
This is the CUE shape a Praxis template uses to declare a Route53Record. The resource key is local to the template; metadata.name supplies its stable Praxis identity.
resources: {
validationRecord: {
apiVersion: "praxis.io/alpha"
kind: "Route53Record"
metadata: name: "\(variables.name)-\(variables.environment)-cert-validation"
spec: {
region: "us-east-1"
hostedZoneId: variables.hostedZoneId
name: "${resources.cert.outputs.dnsValidationRecords[0].resourceRecordName}"
type: "CNAME"
ttl: 300
resourceRecords: [
"${resources.cert.outputs.dnsValidationRecords[0].resourceRecordValue}",
]
}
}
}Excerpted from examples/acm/https-stack.cue. Open the complete example for its variables and related resources.
Desired state
Configuration
The spec block accepts 13 fields. 3 are required by the schema; fields with defaults can be omitted.
hostedZoneIdRequiredHosted Zone ID.
stringnameRequiredName.
stringtypeRequiredType.
stringttlOptionalTtl.
intresourceRecordsOptionalResource Records.
[...string]aliasTargetOptionalAlias Target.
{ hostedZoneId: string dnsName: string evaluateTargetHealth: bool | *false }setIdentifierOptionalSet Identifier.
stringweightOptionalWeight.
intregionOptionalRegion.
stringfailoverOptionalFailover.
"PRIMARY" | "SECONDARY"geoLocationOptionalGeo Location.
{ continentCode?: string countryCode?: string subdivisionCode?: string }multiValueAnswerOptionalMulti Value Answer.
boolhealthCheckIdOptionalHealth Check ID.
stringObserved values
Outputs
Praxis records these values after observation. A dependent resource can read one with ${resources.<name>.outputs.<field>}.
hostedZoneIdStringfqdnStringtypeStringsetIdentifierString · optionalRead without ownership
Data-source lookup
A data block reads an existing Route53Record 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: "Route53Record"
region: "us-west-2"
filter: {
name: "replace-with-provider-name"
}
}Adopt existing infrastructure
Import
Import persists Praxis state for an existing AWS resource. For this kind, supply: Provider identifier for the existing Route53Record. The example starts in observed mode so Praxis reports drift without correcting it.
praxis import Route53Record \
--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 route53
#Route53Record: {
apiVersion: "praxis.io/alpha"
kind: "Route53Record"
metadata: {
name: string & =~"^[A-Za-z0-9][A-Za-z0-9._-]{0,254}$"
labels: [string]: string
}
spec: {
hostedZoneId: string
name: string
type: string
ttl?: int
resourceRecords?: [...string]
aliasTarget?: {
hostedZoneId: string
dnsName: string
evaluateTargetHealth: bool | *false
}
setIdentifier?: string
weight?: int
region?: string
failover?: "PRIMARY" | "SECONDARY"
geoLocation?: {
continentCode?: string
countryCode?: string
subdivisionCode?: string
}
multiValueAnswer?: bool
healthCheckId?: string
}
outputs?: {
hostedZoneId: string
fqdn: string
type: string
setIdentifier?: string
}
}