Skip to content

smallstep/terraform-provider-smallstep

Repository files navigation

Terraform Provider Smallstep

Usage

The Terraform Registry has Documentation for using the Smallstep provider.

Developing

This repository is based on the Terraform Plugin Framework.

It uses an API client generated from Smallstep's OpenAPI spec. The generated client and server can be copied from the API repo to internal/apiclient and internal/apiserver. The generated server is only used to get documentation for fields since it embedds OpenAPI spec.

Requirements

Building The Provider

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

Documentation

To generate or update documentation, run go generate.

Testing

In order to run the full suite of Acceptance tests, run make testacc.

Note: Acceptance tests create real resources, and often cost money to run.

make testacc

Use these environment variables to configure the account the tests run against:

  • SMALLSTEP_API_TOKEN
  • SMALLSTEP_API_URL
  • SMALLSTEP_CA_DOMAIN

A sweeper is defined to clean up all authorities older than 1 day unless the authority domain begins with keep-.

make sweep