Skip to content

Tool that helps to create the terraform custom provider by creating scaffolds.

License

Notifications You must be signed in to change notification settings

nikhilsbhat/terragen

Repository files navigation

terragen

Go Report Card shields shields shields shields

A utility to ease the development of terraform custom provider by generating scaffolds for provider and their components.

Introduction

Terraform is one of the best software available to automate infrastructure and no procrastination in accepting this fact.

How about extending Terraform?. It would be great when we try solving complexity that is project-specific, and Terraform offers the same feature in the form of a custom provider. How to create one such provider? They have well documented steps for it.

How about accelerating the development of such custom-provider with the scaffolds? Terragen helps here. It generates scaffolds for provider, resources, and data_sources that eases the development of the custom provider.

Supports the addition of new scaffolds of data_source and resource for a specific Terraform provider as and when required.

Requirements

  • Go 1.19 or above . Installing go can be found here.
  • Basic understanding of terraform provider and building them.

Installation

  • Recommend installing released versions. Release binaries are available on the releases page.
  • Can always build it locally by running go build against cloned repo.

Features supported by the Terragen at the moment.

component create edit delete
provider yes yes (beta) no
data_source yes yes (beta) no
resource yes yes (beta) no
importer no no no

Documentation

  • Document of Terragen on its usage is up here.
  • Updated documentation on all available commands and flags can be found here.

Installation

  • Recommend installing released versions. Release binaries are available on the releases page and docker from here.
  • Can always build it locally by running go build against cloned repo.

Docker

Latest version of docker images are published to ghcr.io, all available images can be found there.

docker pull ghcr.io/nikhilsbhat/terragen:latest
docker pull ghcr.io/nikhilsbhat/terragen:<github-release-tag>

TODO

  • Edit feature to cover more aspect.
  • Test cases.

Note terragen generate just creates the templates not the whole provider.