Skip to content

Latest commit

 

History

History
150 lines (121 loc) · 2.82 KB

File metadata and controls

150 lines (121 loc) · 2.82 KB

fortios_firewall_internetserviceaddition

back

Index

Terraform

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

top

Example Usage

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

  # comment - (optional) is a type of string
  comment = null
  # dynamic_sort_subtable - (optional) is a type of string
  dynamic_sort_subtable = null
  # fosid - (optional) is a type of number
  fosid = null

  entry = [{
    id = null
    port_range = [{
      end_port   = null
      id         = null
      start_port = null
    }]
    protocol = null
  }]
}

top

Variables

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

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

variable "fosid" {
  description = "(optional)"
  type        = number
  default     = null
}

variable "entry" {
  description = "nested block: NestingList, min items: 0, max items: 0"
  type = set(object(
    {
      id = number
      port_range = list(object(
        {
          end_port   = number
          id         = number
          start_port = number
        }
      ))
      protocol = number
    }
  ))
  default = []
}

top

Resource

resource "fortios_firewall_internetserviceaddition" "this" {
  # comment - (optional) is a type of string
  comment = var.comment
  # dynamic_sort_subtable - (optional) is a type of string
  dynamic_sort_subtable = var.dynamic_sort_subtable
  # fosid - (optional) is a type of number
  fosid = var.fosid

  dynamic "entry" {
    for_each = var.entry
    content {
      # id - (optional) is a type of number
      id = entry.value["id"]
      # protocol - (optional) is a type of number
      protocol = entry.value["protocol"]

      dynamic "port_range" {
        for_each = entry.value.port_range
        content {
          # end_port - (optional) is a type of number
          end_port = port_range.value["end_port"]
          # id - (optional) is a type of number
          id = port_range.value["id"]
          # start_port - (optional) is a type of number
          start_port = port_range.value["start_port"]
        }
      }

    }
  }

}

top

Outputs

output "fosid" {
  description = "returns a number"
  value       = fortios_firewall_internetserviceaddition.this.fosid
}

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

output "this" {
  value = fortios_firewall_internetserviceaddition.this
}

top