This repository has been archived on 2026-11-19 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
main
Reviewed-on: #6
Terraform Provider encapi
The encapi provider manages a Puppet External Node Classifier (ENC) served by encapi: Puppet environments (statuses), roles with inheritable default parameters, and per-node role assignments. It works with Terraform and OpenTofu.
Quick start
Prebuilt provider archives are on the releases page.
terraform {
required_providers {
encapi = {
source = "IUCLabs/encapi"
}
}
}
provider "encapi" {
endpoint = "https://encapi.example.com"
# token defaults to the ENCAPI_WRITE_TOKEN environment variable
}
resource "encapi_status" "production" {
name = "production"
}
resource "encapi_role" "web" {
name = "roles::web"
default_params = jsonencode({ port = 8080 })
}
resource "encapi_node" "web01" {
certname = "web01.example.com"
role = encapi_role.web.name
environment = encapi_status.production.name
}
Reads are unauthenticated; writes need the bearer token.
Requirements
Building
make build # or: go build
make test
make docs # regenerate docs/ from the schema and examples/
Documentation
See docs/ for the provider, resource and data source
reference, and examples/ for usage.
License
Languages
Go
93.8%
Makefile
5.1%
Shell
1.1%