Skip to content

Latest commit

 

History

History
136 lines (108 loc) · 2.44 KB

fortios_switchcontroller_quarantine.md

File metadata and controls

136 lines (108 loc) · 2.44 KB

fortios_switchcontroller_quarantine

back

Index

Terraform

terraform {
  required_providers {
    fortios = ">= 1.11.0"
  }
}

top

Example Usage

module "fortios_switchcontroller_quarantine" {
  source = "./modules/fortios/r/fortios_switchcontroller_quarantine"

  # dynamic_sort_subtable - (optional) is a type of string
  dynamic_sort_subtable = null
  # quarantine - (optional) is a type of string
  quarantine = null

  targets = [{
    description = null
    entry_id    = null
    mac         = null
    tag = [{
      tags = null
    }]
  }]
}

top

Variables

variable "dynamic_sort_subtable" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "quarantine" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "targets" {
  description = "nested block: NestingList, min items: 0, max items: 0"
  type = set(object(
    {
      description = string
      entry_id    = number
      mac         = string
      tag = list(object(
        {
          tags = string
        }
      ))
    }
  ))
  default = []
}

top

Resource

resource "fortios_switchcontroller_quarantine" "this" {
  # dynamic_sort_subtable - (optional) is a type of string
  dynamic_sort_subtable = var.dynamic_sort_subtable
  # quarantine - (optional) is a type of string
  quarantine = var.quarantine

  dynamic "targets" {
    for_each = var.targets
    content {
      # description - (optional) is a type of string
      description = targets.value["description"]
      # entry_id - (optional) is a type of number
      entry_id = targets.value["entry_id"]
      # mac - (optional) is a type of string
      mac = targets.value["mac"]

      dynamic "tag" {
        for_each = targets.value.tag
        content {
          # tags - (optional) is a type of string
          tags = tag.value["tags"]
        }
      }

    }
  }

}

top

Outputs

output "id" {
  description = "returns a string"
  value       = fortios_switchcontroller_quarantine.this.id
}

output "quarantine" {
  description = "returns a string"
  value       = fortios_switchcontroller_quarantine.this.quarantine
}

output "this" {
  value = fortios_switchcontroller_quarantine.this
}

top