Skip to content

Latest commit

 

History

History
140 lines (113 loc) · 2.51 KB

File metadata and controls

140 lines (113 loc) · 2.51 KB

fortios_router_prefixlist

back

Index

Terraform

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

top

Example Usage

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

  # 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
    flags  = null
    ge     = null
    id     = null
    le     = null
    prefix = 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
      flags  = number
      ge     = number
      id     = number
      le     = number
      prefix = string
    }
  ))
  default = []
}

top

Resource

resource "fortios_router_prefixlist" "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"]
      # flags - (optional) is a type of number
      flags = rule.value["flags"]
      # ge - (optional) is a type of number
      ge = rule.value["ge"]
      # id - (optional) is a type of number
      id = rule.value["id"]
      # le - (optional) is a type of number
      le = rule.value["le"]
      # prefix - (optional) is a type of string
      prefix = rule.value["prefix"]
    }
  }

}

top

Outputs

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

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

output "this" {
  value = fortios_router_prefixlist.this
}

top