Skip to content

Latest commit

 

History

History
126 lines (101 loc) · 2.42 KB

File metadata and controls

126 lines (101 loc) · 2.42 KB

ciscoasa_access_in_rules

back

Index

Terraform

terraform {
  required_providers {
    ciscoasa = ">= 1.2.0"
  }
}

top

Example Usage

module "ciscoasa_access_in_rules" {
  source = "./modules/ciscoasa/r/ciscoasa_access_in_rules"

  # interface - (required) is a type of string
  interface = null
  # managed - (optional) is a type of bool
  managed = null

  rule = [{
    active              = null
    destination         = null
    destination_service = null
    id                  = null
    permit              = null
    source              = null
    source_service      = null
  }]
}

top

Variables

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

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

variable "rule" {
  description = "nested block: NestingSet, min items: 1, max items: 0"
  type = set(object(
    {
      active              = bool
      destination         = string
      destination_service = string
      id                  = string
      permit              = bool
      source              = string
      source_service      = string
    }
  ))
}

top

Resource

resource "ciscoasa_access_in_rules" "this" {
  # interface - (required) is a type of string
  interface = var.interface
  # managed - (optional) is a type of bool
  managed = var.managed

  dynamic "rule" {
    for_each = var.rule
    content {
      # active - (optional) is a type of bool
      active = rule.value["active"]
      # destination - (required) is a type of string
      destination = rule.value["destination"]
      # destination_service - (required) is a type of string
      destination_service = rule.value["destination_service"]
      # permit - (optional) is a type of bool
      permit = rule.value["permit"]
      # source - (required) is a type of string
      source = rule.value["source"]
      # source_service - (optional) is a type of string
      source_service = rule.value["source_service"]
    }
  }

}

top

Outputs

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

output "this" {
  value = ciscoasa_access_in_rules.this
}

top