dalet-oss / terraform-provider-opnsense

Terraform Provider for OPNSense DHCP Leases
Apache License 2.0
34 stars 6 forks source link

Terraform provider for OPNSense

This is a Terraform provider that lets you:

What is NOT in scope:

Getting Started

In your main.tf file, specify the version you want to use:

terraform {
  required_providers {
    libvirt = {
      source = "gxben/opnsense"
    }
  }
}

provider "opnsense" {
  # Configuration options
}

And now run terraform init:

$ terraform init

Provider configuration

provider "opnsense" {
  uri      = "https://acme.com"
  user     = "terraform"
  password = "complex_password"
}

Resource configuration

resource "opnsense_dhcp_static_map" "dhcp1" {
  interface = "opt3"
  mac       = "00:11:22:33:44:55"
  ipaddr    = "192.168.0.100"
  hostname  = "my_hostname"
}

resource "opnsense_dns_host_override" "dns1" {
  type   = "A"
  host   = "www"
  domain = "acme.local"
  ip     = "192.168.0.1"
}

Authors

License