Skip to main content

Provider Setup

The v2 provider extends the NetActuate Terraform provider with support for VPC, Kubernetes, cloud routing, storage, firewalls, and secrets resources.

Installation​

Add the provider to your Terraform configuration with a minimum version of 0.2.5:

terraform {
required_providers {
netactuate = {
source = "netactuate/netactuate"
version = ">= 0.2.5"
}
}
}

Run terraform init to download and install the provider.

Authentication​

The provider requires a NetActuate API key. You can generate one in the NetActuate portal under Account -> API Keys. For details on API key setup, see API Access.

Environment Variable​

Set the NETACTUATE_API_KEY environment variable:

export NETACTUATE_API_KEY="your-api-key-here"

Then configure the provider without specifying the key:

provider "netactuate" {}

Inline Configuration​

Alternatively, pass the key directly (not recommended for version-controlled files):

provider "netactuate" {
api_key = var.netactuate_api_key
}

Define the variable in a variables.tf file:

variable "netactuate_api_key" {
type = string
sensitive = true
}

Note: Never commit API keys to version control. Use environment variables, Terraform variables with .tfvars files (excluded from version control), or a secrets manager.

Provider Arguments​

ArgumentDescriptionRequiredDefault
api_keyNetActuate API keyYes (or use env var)NETACTUATE_API_KEY env var
api_urlAPI v2 base URLNohttps://api.netactuate.com
api_url_v3API v3 base URL for VPC, NKE, routers, and storage resourcesNohttps://api-v3.netactuate.com

The api_url_v3 argument is new in v2. Resources that use the v3 API: including VPC, NKE clusters, cloud routers, storage, firewalls, and secrets: communicate through this endpoint. You do not need to set it unless you are using a non-default API environment.

Verification​

After configuring the provider, run the following to verify the setup:

terraform init
terraform plan

If authentication is successful, terraform plan will complete without authentication errors.

Need Help?​

If you need assistance with the NetActuate provider, visit our support page.