Skip to content

jeremyw-dobeu/terraform-provider-castai

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Provider for CAST AI

Website: https://www.cast.ai

Build Status

Requirements

  • Terraform 0.13+
  • Go 1.16 (to build the provider plugin)

Using the provider

To install this provider, put the following code into your Terraform configuration. Then, run terraform init.

terraform {
  required_providers {
    castai = {
      source  = "castai/castai"
      version = "0.3.0" # can be omitted for the latest version
    }
  }
  required_version = ">= 0.13"
}

provider "castai" {
  api_token = "<<your-castai-api-key>>"
}

Alternatively, you can pass api key via environment variable:

$ CASTAI_API_TOKEN=<<your-castai-api-key>> terraform plan

For more logs use the log level flag:

$ TF_LOG=DEBUG terraform plan

More examples can be found here.

Learn why required_providers block is required in terraform 0.13 upgrade guide.

Developing the provider

Make sure you have Go installed on your machine (please check the requirements).

To build the provider locally:

$ git clone https://github.com/CastAI/terraform-provider-castai.git
$ cd terraform-provider-castai
$ make build

make build builds the provider and install symlinks to that build for all terraform projects in examples/* dir. Now you can work on examples/localdev.

Whenever you make changes to the provider re-run make build.

You'll need to run terraform init in your terraform project again since the binary has changed.

To run unit tests:

$ make test

Releasing the provider

This repository contains a github action to automatically build and publish assets for release when tag is pushed with pattern v* (ie. v0.1.0).

Gorelaser is used to produce build artifacts matching the layout required to publish the provider in the Terraform Registry.

Releases will appear as drafts. Once marked as published on the GitHub Releases page, they will become available via the Terraform Registry.

About

Terraform: Terraform provider for CAST.AI platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 95.2%
  • HCL 3.8%
  • Other 1.0%