There 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 apply
Do the following to run and test the TF provider locally:
- Install the dependencies:
make deps
- 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, .terraform.lock.hcl file must be removed and the test example modules re-initialize, because the provider dependency's hash changes
cd example terraform init
- Build the infrastructure:
terraform apply