Resource definition
What this resource looks like
This is the CUE shape a Praxis template uses to declare a Route53HealthCheck. The resource key is local to the template; metadata.name supplies its stable Praxis identity.
resources: {
albHealthCheck: {
apiVersion: "praxis.io/alpha"
kind: "Route53HealthCheck"
metadata: name: "\(_naming.prefix)-alb-health"
spec: {
type: "HTTPS"
fqdn: variables.domainName
port: 443
resourcePath: "/healthz"
requestInterval: 30
failureThreshold: 3
enableSNI: true
tags: #StandardTags & {purpose: "endpoint-health"}
}
}
}Excerpted from examples/stacks/end-to-end.cue. Open the complete example for its variables and related resources.
Desired state
Configuration
The spec block accepts 18 fields. 1 is required by the schema; fields with defaults can be omitted.
typeRequiredType.
"HTTP" | "HTTPS" | "HTTP_STR_MATCH" | "HTTPS_STR_MATCH" | "TCP" | "CALCULATED" | "CLOUDWATCH_METRIC"ipAddressOptionalIp Address.
stringportOptionalPort.
intresourcePathOptionalResource Path.
stringfqdnOptionalFqdn.
stringsearchStringOptionalSearch String.
stringrequestIntervalOptionalRequest Interval.
10 | 30failureThresholdOptionalFailure Threshold.
intchildHealthChecksOptionalChild Health Checks.
[...string]healthThresholdOptionalHealth Threshold.
intcloudWatchAlarmNameOptionalCloud Watch Alarm Name.
stringcloudWatchAlarmRegionOptionalCloud Watch Alarm Region.
stringinsufficientDataHealthStatusOptionalInsufficient Data Health Status.
"Healthy" | "Unhealthy" | "LastKnownStatus"disabledOptionalDisabled.
bool | *falsefalseinvertHealthCheckOptionalInvert Health Check.
bool | *falsefalseenableSNIOptionalEnable SNI.
bool | *falsefalseregionsOptionalRegions.
[...string]tagsOptionalTags.
[string]: stringObserved values
Outputs
Praxis records these values after observation. A dependent resource can read one with ${resources.<name>.outputs.<field>}.
healthCheckIdStringRead without ownership
Data-source lookup
A data block reads an existing Route53HealthCheck 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: "Route53HealthCheck"
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 Route53HealthCheck. The example starts in observed mode so Praxis reports drift without correcting it.
praxis import Route53HealthCheck \
--id <provider-identifier> \
--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
#Route53HealthCheck: {
apiVersion: "praxis.io/alpha"
kind: "Route53HealthCheck"
metadata: {
name: string & =~"^[A-Za-z0-9][A-Za-z0-9._-]{0,254}$"
labels: [string]: string
}
spec: {
type: "HTTP" | "HTTPS" | "HTTP_STR_MATCH" | "HTTPS_STR_MATCH" | "TCP" | "CALCULATED" | "CLOUDWATCH_METRIC"
ipAddress?: string
port?: int
resourcePath?: string
fqdn?: string
searchString?: string
requestInterval?: 10 | 30
failureThreshold?: int
childHealthChecks?: [...string]
healthThreshold?: int
cloudWatchAlarmName?: string
cloudWatchAlarmRegion?: string
insufficientDataHealthStatus?: "Healthy" | "Unhealthy" | "LastKnownStatus"
disabled?: bool | *false
invertHealthCheck?: bool | *false
enableSNI?: bool | *false
regions?: [...string]
tags?: [string]: string
}
outputs?: {
healthCheckId: string
}
}