Skip to content

Terraform Provider for Taikun

User | Manager | Partner

Useful Information


Using the provider

Requirements

QuickStart templates

Quickstart templates for creating VMs, K8s, Applications, Virtual clusters and more are available in this repository at path examples/quickstart-templates

Documentation

The provider's documentation is available on the Terraform registry. See the section titled USE PROVIDER to start using it.


Developing the provider

Requirements


Building and installing the provider

Building the provider locally

If you have the Go toolchain installed on your machine, you can build and install the provider with the following command.

make install

Otherwise, you can build the provider in a docker container.

make dockerinstall

Documenting the provider

We use tfplugindocs to generate documentation for the provider.

To generate or update documentation, run go generate locally or run the generate documentation workflow with your target branch as an input.

This reads the templates in the templates directory, the Terraform configuration examples in the examples directory and finally the resource (or data source) schemas themselves to generate the documentation in the docs directory.

In other words, suppose you are creating a new resource taikun_project, you would need to add the following files before running go generate. - A Terraform configuration example in ./examples/resources/taikun_project/resource.tf - A terraform import script in ./examples/resources/taikun_project/import.sh (this is usually just terraform import <resource type>.<name> <id>) - A template in templates/resources/project.md.tmpl

As mentioned previously, the documentation of provider releases is available on the Terraform registry.

The Doc Preview Tool by Hashicorp is also a useful way to preview the final look of the documentation.

Running the locally built provider

To tell Terraform to retrieve the provider locally instead of fetching it from the registry, use the following terraform configuration block.

terraform {
  required_providers {
    taikun = {
      source  = "itera-io/dev/taikun"
    }
  }
}