Currently in this stage of development -
Basic Steps to test:
# Grab the provider:
git clone git@github.com:netactuate/terraform-provider-netactuate.git
# Install and download all the dependencies and compile all related binaries
cd terraform-netactuate-provider
make install-all
# Edit an example: [basic, full, cluster]
cd examples/basic
export NETACTUATE_API_KEY="my-api-key"
edit main.tf
terraform init
terraform plan
terraform applyThere are the following ways of providing credentials for authentication:
- Static credentials
- Environment variable
NOTE:
Hard-coded credentials are not recommended in any Terraform configuration and risks secret leakage should this file ever be committed to a public version control system.
Static credentials can be provided by adding an api_key in-line in the provider block:
provider "netactuate" {
api_key = "my-api-key"
}You can provide your credentials via the NETACTUATE_API_KEY environment variable, representing your NetActuate API Key:
provider "netactuate" {}export NETACTUATE_API_KEY="my-api-key"
terraform applyDo the following to run and test the TF provider locally:
- Compile and install the TF provider's binaries to the local TF plugins directory:
make install-all
- Install TF providers for the test example:
Every time the provider is re-built,
cd example terraform init.terraform.lock.hclfile must be removed and the test example modules re-initialize, because the provider dependency's hash changes - Build the infrastructure:
terraform apply
If necessary, you can override the default NetActuate API URL by specifying a custom api_url in the provider block:
provider "netactuate" {
api_url = "https://api.example.com/"
}