/terraform-provider-netactuate

NetActuate Terraform Provider

Primary LanguageGo

Terraform Provider NetActuate

Usage

Authentication

There are the following ways of providing credentials for authentication:

  1. Static credentials
  2. Environment variable

Static credentials

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"
}

Environment Variables

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 apply

Development

Run locally

Do the following to run and test the TF provider locally:

  1. Install the dependencies:
    make deps 
  2. Compile and install the TF provider's binaries to the local TF plugins directory:
    make install-all
  3. Install TF providers for the test example:
    cd example
    terraform init
    Every time the provider is re-built, .terraform.lock.hcl file must be removed and the test example modules re-initialize, because the provider dependency's hash changes
  4. Build the infrastructure:
    terraform apply

Custom API URL

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/"
}