lxc / terraform-provider-incus

Incus provider for Terraform/OpenTofu
https://linuxcontainers.org/incus
Mozilla Public License 2.0
50 stars 11 forks source link

Add network ACL resource #84

Closed maveonair closed 3 months ago

maveonair commented 3 months ago

This pull requests adds the network ACL resource (see https://github.com/lxc/terraform-provider-incus/issues/78).

Examples

resource "incus_network_acl" "this" {
  name        = "my-acl"
  description = "foo"
}
resource "incus_network_acl" "this" {
  name        = "my-acl"
  description = "foo"

  egress = [
    {
      action           = "allow"
      destination      = "1.1.1.1,1.0.0.1"
      destination_port = "53"
      protocol         = "udp"
      description      = "DNS to cloudflare public resolvers (UDP)"
      state            = "enabled"
    },
    {
      action           = "allow"
      destination      = "1.1.1.1,1.0.0.1"
      destination_port = "53"
      protocol         = "tcp"
      description      = "DNS to cloudflare public resolvers (TCP)"
      state            = "enabled"
    }
  ]

  ingress = [
    {
      action           = "allow"
      source           = "@external"
      destination_port = "22"
      protocol         = "tcp"
      description      = "Incoming SSH connections"
      state            = "logged"
    }
  ]
}

What's been done