Using the nullplatform IaC provider
The nullplatform IaC provider allows you to manage your nullplatform resources using infrastructure-as-code (IaC) tools, simplifying the process of automating and managing your infrastructure.
This guide is applicable for IaC tools such as Terraform and OpenTofu.
Installation
-
To use the provider, add the following to your IaC configuration:
terraform {
required_providers {
nullplatform = {
source = "nullplatform/nullplatform"
version = "x.y.z" // Replace with a specific version or omit to use the latest
}
}
} -
Run the following command to install the provider:
- OpenTofu
- Terraform
tofu init
terraform init
-
Run the following command to check the provider is correctly installed.
- OpenTofu
- Terraform
tofu providers | grep nullplatform
terraform providers | grep nullplatform
If installed correctly, you should see an output similar to:
├── provider[registry.nullplatform.io/nullplatform/nullplatform]
Authentication
To authenticate, configure the provider with an API key. You can set the API key either as a variable or use the NULLPLATFORM_API_KEY
environment variable.
provider "nullplatform" {
api_key = var.nullplatform_api_key
}
See our API keys docs for more info.
Next steps
Refer to our IaC provider plugin for additional documentation, including resource details and configuration examples.