The phpipam_vlan
resource can be used to manage a VLAN on PHPIPAM. Use it to
set up a VLAN through Terraform, or update details such as its name or
description. If you are just looking for information on a VLAN, use the
phpipam_vlan
data source instead.
Example:
resource "phpipam_vlan" "vlan" {
name = "tf-test"
number = 1000
description = "Managed by Terraform"
custom_fields = {
custom_CustomTestVLANs = "terraform-test"
}
}
The resource takes the following parameters:
name
(Required) - The name/label of the VLAN.number
(Required) - The number of the VLAN (the actual VLAN ID on your switch).l2_domain_id
(Optional) - The layer 2 domain ID in the PHPIPAM database.description
(Optional) - The description supplied to the VLAN.edit_date
(Optional) - The date this resource was last updated.custom_fields
(Optional) - A key/value map of custom fields for this VLAN.
The following attributes are exported:
vlan_id
- The ID of the VLAN to look up. NOTE: this is the database ID, not the VLAN number - if you need this, use thenumber
parameter.edit_date
- The date this resource was last updated.