Resource definition
What this resource looks like
This is the CUE shape a Praxis template uses to declare a LogGroup. The resource key is local to the template; metadata.name supplies its stable Praxis identity.
resources: logs: {
apiVersion: "praxis.io/alpha"
kind: "LogGroup"
metadata: {name: "/praxis/payments", labels: {}}
spec: {
region: "us-west-2"
retentionInDays: 30
tags: environment: "prod"
}
}Desired state
Configuration
The spec block accepts 5 fields. 2 are required by the schema; fields with defaults can be omitted.
regionRequiredRegion.
stringlogGroupClassOptionalLog Group Class.
"STANDARD" | "INFREQUENT_ACCESS" | *"STANDARD""STANDARD"retentionInDaysOptionalRetention In Days.
1 | 3 | 5 | 7 | 14 | 30 | 60 | 90 | 120 | 150 |kmsKeyIdOptionalKms Key ID.
stringtagsRequiredTags.
[string]: stringObserved values
Outputs
Praxis records these values after observation. A dependent resource can read one with ${resources.<name>.outputs.<field>}.
arnStringlogGroupNameStringlogGroupClassStringretentionInDaysIntegerkmsKeyIdString · optionalcreationTimeIntegerstoredBytesIntegerRead without ownership
Data-source lookup
A data block reads an existing LogGroup 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: "LogGroup"
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: Log group name and region. The example starts in observed mode so Praxis reports drift without correcting it.
praxis import LogGroup \
--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 cloudwatch
#LogGroup: {
apiVersion: "praxis.io/alpha"
kind: "LogGroup"
metadata: {
name: string & =~"^[.\\-_/#A-Za-z0-9]{1,512}$"
labels: [string]: string
}
spec: {
region: string
logGroupClass: "STANDARD" | "INFREQUENT_ACCESS" | *"STANDARD"
retentionInDays?: 1 | 3 | 5 | 7 | 14 | 30 | 60 | 90 | 120 | 150 |
180 | 365 | 400 | 545 | 731 | 1096 | 1827 | 2192 |
2557 | 2922 | 3288 | 3653
kmsKeyId?: string
tags: [string]: string
}
outputs?: {
arn: string
logGroupName: string
logGroupClass: string
retentionInDays: int
kmsKeyId?: string
creationTime: int
storedBytes: int
}
}