The Nexaa Provider enables Terraform to manage Nexaa resources.
To start using the Nexaa provider for terraform you need to have an API account for Nexaa. See below an example for a base terraform file without any resources.
terraform {
required_providers {
nexaa = {
source = "nexaa-cloud/nexaa"
version = "0.1.4"
}
}
}
provider "nexaa" {
username = "[email protected]"
password = "example"
}To start contributing to the provider you need to use a local version for developing. First you need to pull the provider code from github.
For running acceptance tests, you need to set up credentials. You can either:
-
Use a .env file (recommended for development):
cp .env.example .env # Edit .env and add your credentials -
Set environment variables directly:
export NEXAA_USERNAME="your-username" export NEXAA_PASSWORD="your-password"
Then you need to install the binary of the provider. That can be done by using the command below. Remember that everytime you made a change in the provider and it's not deployed execute this command again to update your local binary.
go install .This will also install every dependency needed in the go.mod file of the provider. Part of the dependencies is the nexaa-CLI. You can also use a local version of the CLI. To do this you need to pull the cli from github.
The project uses a go.work file that references the local CLI. You'll need to update the path in the go.work file to point to where you have the CLI repository located:
go 1.24.6
use (
.
../tilaa-cli # Update this path to where your local CLI is located
tools
)
This setup automatically uses your local version of the CLI without needing to modify go.mod files.
The next step is to make terraform use the local binary instead of searching in the online registry. To do this create a .terraformrc file in the root directory of your machine and this text to it and change the path to the absolute path of the provider binary. Usually it's located in the go/bin folder.
provider_installation
{
dev_overrides {
"nexaa-cloud/nexaa" = "absolute/path/to/provider/binary"
}
direct {}
}Now to start using your local provider create a tf file the same way you would when using the deployed provider. The only difference is that you can immediately start using it using
terraform applyImportant links:
Please note: We take Terraform's security and our users' trust very seriously. If you believe you have found a security issue in the Terraform Nexaa Provider, please responsibly disclose it by contacting us at [email protected].