Skip to content

Latest commit

 

History

History
140 lines (113 loc) · 2.61 KB

fortios_router_accesslist.md

File metadata and controls

140 lines (113 loc) · 2.61 KB

fortios_router_accesslist

back

Index

Terraform

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

top

Example Usage

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

  # comments - (optional) is a type of string
  comments = null
  # dynamic_sort_subtable - (optional) is a type of string
  dynamic_sort_subtable = null
  # name - (required) is a type of string
  name = null

  rule = [{
    action      = null
    exact_match = null
    flags       = null
    id          = null
    prefix      = null
    wildcard    = null
  }]
}

top

Variables

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

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

variable "name" {
  description = "(required)"
  type        = string
}

variable "rule" {
  description = "nested block: NestingList, min items: 0, max items: 0"
  type = set(object(
    {
      action      = string
      exact_match = string
      flags       = number
      id          = number
      prefix      = string
      wildcard    = string
    }
  ))
  default = []
}

top

Resource

resource "fortios_router_accesslist" "this" {
  # comments - (optional) is a type of string
  comments = var.comments
  # dynamic_sort_subtable - (optional) is a type of string
  dynamic_sort_subtable = var.dynamic_sort_subtable
  # name - (required) is a type of string
  name = var.name

  dynamic "rule" {
    for_each = var.rule
    content {
      # action - (optional) is a type of string
      action = rule.value["action"]
      # exact_match - (optional) is a type of string
      exact_match = rule.value["exact_match"]
      # flags - (optional) is a type of number
      flags = rule.value["flags"]
      # id - (optional) is a type of number
      id = rule.value["id"]
      # prefix - (optional) is a type of string
      prefix = rule.value["prefix"]
      # wildcard - (optional) is a type of string
      wildcard = rule.value["wildcard"]
    }
  }

}

top

Outputs

output "comments" {
  description = "returns a string"
  value       = fortios_router_accesslist.this.comments
}

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

output "this" {
  value = fortios_router_accesslist.this
}

top