Skip to content

Latest commit

 

History

History
145 lines (116 loc) · 2.54 KB

File metadata and controls

145 lines (116 loc) · 2.54 KB

fortios_firewall_identitybasedroute

back

Index

Terraform

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

top

Example Usage

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

  # 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 = [{
    device  = null
    gateway = null
    groups = [{
      name = null
    }]
    id = 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(
    {
      device  = string
      gateway = string
      groups = list(object(
        {
          name = string
        }
      ))
      id = number
    }
  ))
  default = []
}

top

Resource

resource "fortios_firewall_identitybasedroute" "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 {
      # device - (optional) is a type of string
      device = rule.value["device"]
      # gateway - (optional) is a type of string
      gateway = rule.value["gateway"]
      # id - (optional) is a type of number
      id = rule.value["id"]

      dynamic "groups" {
        for_each = rule.value.groups
        content {
          # name - (optional) is a type of string
          name = groups.value["name"]
        }
      }

    }
  }

}

top

Outputs

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

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

output "this" {
  value = fortios_firewall_identitybasedroute.this
}

top