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.
benvin 7852acf457
ci / pre-commit (push) Has been cancelled
ci / lint (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (push) Has been cancelled
release / release (push) Has been cancelled
Merge pull request 'Add GitHub Actions CI and GoReleaser release' (#6) from benvin/github-actions into main
Reviewed-on: #6
2026-11-19 00:15:34 +11:00
2026-11-17 06:27:06 +11:00
2026-11-17 22:38:19 +11:00

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

MIT

S
Description
Terraform provider for encapi: manage Puppet ENC roles, statuses, and node assignments.
Readme MIT 78 KiB
Languages
Go 93.8%
Makefile 5.1%
Shell 1.1%