OPNsense Provider
~> Please note that this provider is under active development, and makes no guarantee to be stable. For that reason, it is not currently recommended to use this provider in any production environment. If a feature is missing, but is documented in the OPNsense API, please raise an issue on the Github repo to indicate interest.
The OPNsense provider is used to interact with resources (only) supported by the OPNsense API. This provider does not, and will not, support resources not currently supported by the OPNsense API. If required, see if dalet-oss/opnsense will support your needs.
The provider needs to be configured with the proper API credentials before it can be used.
Getting Started
To generate the API key & secret, follow the OPNsense docs. These can then be used to configure the provider.
Example Usage
terraform {
required_providers {
opnsense = {
version = "~> x.0"
source = "browningluke/opnsense"
}
}
}
provider "opnsense" {
uri = "https://opnsense.example.com"
api_key = "..."
api_secret = "..."
}
Schema
Optional
allow_insecure(Boolean) Allow insecure TLS connections. Alternatively, can be configured using theOPNSENSE_ALLOW_INSECUREenvironment variable. Defaults tofalse.api_key(String) The API key for a user. Alternatively, can be configured using theOPNSENSE_API_KEYenvironment variable.api_secret(String) The API secret for a user. Alternatively, can be configured using theOPNSENSE_API_SECRETenvironment variable.max_backoff(Number) Maximum backoff period in seconds after failed API calls. Alternatively, can be configured using theOPNSENSE_MAX_BACKOFFenvironment variable.min_backoff(Number) Minimum backoff period in seconds after failed API calls. Alternatively, can be configured using theOPNSENSE_MIN_BACKOFFenvironment variable.retries(Number) Maximum number of retries to perform when an API request fails. Alternatively, can be configured using theOPNSENSE_RETRIESenvironment variable.uri(String) The URI to an OPNsense host. Alternatively, can be configured using theOPNSENSE_URIenvironment variable.