The Timeplus provider for Terraform is a plugin that enables full lifecycle management of Timeplus resources.
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
installcommand:
go installTo use the provider, simply add it to your terraform file, for example:
terraform {
required_providers {
timeplus = {
source = "timeplus-io/timeplus"
version = ">= 0.1.2"
}
}
}
provider "timeplus" {
endpoint = "http://localhost:8000"
username = "proton"
password = "proton@t+"
}Then you can start provisioning Timeplus resources, and below is an example of stream:
resource "timeplus_stream" "example" {
name = "example"
description = "the example stream from the provider README file"
column {
name = "col_1"
type = "string"
}
column {
name = "col_2"
type = "int64"
}
}If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory. Please follow Prepare Terraform for local provider install to use the locally-built provider to test it.
To generate or update documentation, run go generate.
- Timeplus document web site: https://docs.timeplus.com/
- Terraform plugin framework doc: https://developer.hashicorp.com/terraform/plugin/framework