Skip to content

Latest commit

 

History

History
206 lines (170 loc) · 4.08 KB

mso_schema_site_vrf_region.md

File metadata and controls

206 lines (170 loc) · 4.08 KB

mso_schema_site_vrf_region

back

Index

Terraform

terraform {
  required_providers {
    mso = ">= 0.1.5"
  }
}

top

Example Usage

module "mso_schema_site_vrf_region" {
  source = "./modules/mso/d/mso_schema_site_vrf_region"

  # hub_network - (optional) is a type of map of string
  hub_network = {}
  # hub_network_enable - (optional) is a type of bool
  hub_network_enable = null
  # region_name - (required) is a type of string
  region_name = null
  # schema_id - (required) is a type of string
  schema_id = null
  # site_id - (required) is a type of string
  site_id = null
  # template_name - (optional) is a type of string
  template_name = null
  # vpn_gateway - (optional) is a type of bool
  vpn_gateway = null
  # vrf_name - (required) is a type of string
  vrf_name = null

  cidr = [{
    cidr_ip = null
    primary = null
    subnet = [{
      ip    = null
      usage = null
      zone  = null
    }]
  }]
}

top

Variables

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

variable "hub_network_enable" {
  description = "(optional)"
  type        = bool
  default     = null
}

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

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

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

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

variable "vpn_gateway" {
  description = "(optional)"
  type        = bool
  default     = null
}

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

variable "cidr" {
  description = "nested block: NestingList, min items: 0, max items: 0"
  type = set(object(
    {
      cidr_ip = string
      primary = bool
      subnet = list(object(
        {
          ip    = string
          usage = string
          zone  = string
        }
      ))
    }
  ))
  default = []
}

top

Datasource

data "mso_schema_site_vrf_region" "this" {
  # hub_network - (optional) is a type of map of string
  hub_network = var.hub_network
  # hub_network_enable - (optional) is a type of bool
  hub_network_enable = var.hub_network_enable
  # region_name - (required) is a type of string
  region_name = var.region_name
  # schema_id - (required) is a type of string
  schema_id = var.schema_id
  # site_id - (required) is a type of string
  site_id = var.site_id
  # template_name - (optional) is a type of string
  template_name = var.template_name
  # vpn_gateway - (optional) is a type of bool
  vpn_gateway = var.vpn_gateway
  # vrf_name - (required) is a type of string
  vrf_name = var.vrf_name

  dynamic "cidr" {
    for_each = var.cidr
    content {
      # cidr_ip - (optional) is a type of string
      cidr_ip = cidr.value["cidr_ip"]
      # primary - (optional) is a type of bool
      primary = cidr.value["primary"]

      dynamic "subnet" {
        for_each = cidr.value.subnet
        content {
          # ip - (optional) is a type of string
          ip = subnet.value["ip"]
          # usage - (optional) is a type of string
          usage = subnet.value["usage"]
          # zone - (optional) is a type of string
          zone = subnet.value["zone"]
        }
      }

    }
  }

}

top

Outputs

output "hub_network" {
  description = "returns a map of string"
  value       = data.mso_schema_site_vrf_region.this.hub_network
}

output "hub_network_enable" {
  description = "returns a bool"
  value       = data.mso_schema_site_vrf_region.this.hub_network_enable
}

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

output "vpn_gateway" {
  description = "returns a bool"
  value       = data.mso_schema_site_vrf_region.this.vpn_gateway
}

output "this" {
  value = mso_schema_site_vrf_region.this
}

top