Skip to content

Latest commit

 

History

History
181 lines (149 loc) · 3.46 KB

fortios_firewall_internetservicecustom.md

File metadata and controls

181 lines (149 loc) · 3.46 KB

fortios_firewall_internetservicecustom

back

Index

Terraform

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

top

Example Usage

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

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

  entry = [{
    dst = [{
      name = null
    }]
    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 "name" {
  description = "(optional)"
  type        = string
  default     = null
}

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

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

top

Resource

resource "fortios_firewall_internetservicecustom" "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
  # name - (optional) is a type of string
  name = var.name
  # reputation - (optional) is a type of number
  reputation = var.reputation

  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 "dst" {
        for_each = entry.value.dst
        content {
          # name - (optional) is a type of string
          name = dst.value["name"]
        }
      }

      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 "id" {
  description = "returns a string"
  value       = fortios_firewall_internetservicecustom.this.id
}

output "name" {
  description = "returns a string"
  value       = fortios_firewall_internetservicecustom.this.name
}

output "reputation" {
  description = "returns a number"
  value       = fortios_firewall_internetservicecustom.this.reputation
}

output "this" {
  value = fortios_firewall_internetservicecustom.this
}

top