Modules and the catalog
What a Facets module is, what the ready-made catalog covers, who picks the modules, and how to write your own or bring the Terraform modules you have.
A module is a reusable building block, such as a database or a Kubernetes cluster. Facets ships a catalog of them, and your platform team can change them, write its own, or wrap existing Terraform modules.
What a module is, and writing your own
A module is Terraform plus a facets.yaml file that sets its contract: what developers can set, what it needs from other modules, and what it gives back.
Developers fill in a form built from the contract, so they don't need to read the Terraform. This is the catalog's S3 module, trimmed:
intent: s3 # what it provides
flavor: standard # how it's built
version: '1.0'
description: AWS S3 bucket with encryption, versioning, and lifecycle management
clouds: # aws, gcp, azure or kubernetes
- aws
inputs: # what it needs from other modules
cloud_account: # the cloud provider arrives here
type: '@facets/aws_cloud_account'
providers:
- aws
outputs: # what it gives other modules
default:
type: '@facets/s3'
spec: # settings developers fill in (JSON Schema), shown as a form
type: object
properties:
versioning_enabled:
type: boolean
title: Enable Versioning
default: false
sample: # an example resource, checked against the spec on upload
kind: s3
flavor: standard
version: '1.0'
spec:
versioning_enabled: falseYou can write your own two ways:
- By hand, with the Praxis CLI: scaffold, check, upload and publish it (Manually using Raptor).
- By asking Praxis: describe it to your AI assistant, and Praxis writes, validates and tests it in a test environment before publishing (Build through Praxis).
A new module starts in preview, where only test projects can use it. Publishing makes it available to every project (Module Registry).
What's in the catalog, and what if something is missing
The catalog covers common building blocks on AWS, GCP and Azure, such as networks, Kubernetes clusters, databases and caches, and what runs inside those clusters. If something is missing, your platform team writes a module or asks Praxis to build one. Anything Terraform can manage can become a module.
Linode (Akamai) and Vultr are in preview. Browse the full list in the module catalog.
A Helm chart is a resource like any other: the helm module installs it on the environment's cluster with the values you set, and releases upgrade it.
A new control plane has no modules: load the ones you want with the Praxis CLI.
Who picks the modules: you or Praxis
You can pick modules yourself or let Praxis pick them. Either way, they come from your control plane's catalog, and the project type decides which ones a project offers (Project Types).
You pick
Add resources yourself, in the web UI or with the Praxis CLI.
Praxis picks
Describe what you need. Praxis picks the modules and drafts the blueprint for you to review.
Using your existing Terraform modules
Wrap an existing module in a Facets module: add a facets.yaml, and have the Facets module's Terraform call yours, which can stay as it is.
| Plain Terraform | Facets module | |
|---|---|---|
| Variables | Your own | Standard ones, filled from the blueprint |
| Provider | Set by the module or its caller | Arrives through an input, such as the cloud account |
| Outputs | Terraform outputs | output_attributes and output_interfaces, read by other modules |
| Module source | Any | Public ones work as they are. Private ones need Facets support to turn them on |