Label
A label
is a simple identifier for a stack or resource. Labels are how you identify and reference your stacks and resources in formae. Instead of using different terms like "name" or "id" for different technologies, formae uses label
consistently throughout the platform.
Resource labels must be unique within a stack. This ensures you can always reference a specific resource without ambiguity.
Examples
A resource label in Pkl:
new bucket.Bucket {
label = "my-s3-bucket"
bucketName = "my-unique-bucket-name"
}
A stack label in Pkl:
new formae.Stack {
label = "my-stack"
description = "Stack for my resources"
}
Using labels in commands:
# Destroy resources in a specific stack by label
formae destroy --query="stack:production-api"
# View resources with a specific label
formae inventory --query="label:my-s3-bucket"
Tip: Use descriptive labels that clearly identify the purpose of your stacks and resources. Labels are how you'll reference and query your infrastructure.