Website: https://www.cast.ai
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.
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
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.