Skip to content

Latest commit

 

History

History
98 lines (74 loc) · 1.59 KB

alicloud_network_acl_attachment.md

File metadata and controls

98 lines (74 loc) · 1.59 KB

alicloud_network_acl_attachment

back

Index

Terraform

terraform {
  required_providers {
    alicloud = ">= 1.120.0"
  }
}

top

Example Usage

module "alicloud_network_acl_attachment" {
  source = "./modules/alicloud/r/alicloud_network_acl_attachment"

  # network_acl_id - (required) is a type of string
  network_acl_id = null

  resources = [{
    resource_id   = null
    resource_type = null
  }]
}

top

Variables

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

variable "resources" {
  description = "nested block: NestingSet, min items: 1, max items: 0"
  type = set(object(
    {
      resource_id   = string
      resource_type = string
    }
  ))
}

top

Resource

resource "alicloud_network_acl_attachment" "this" {
  # network_acl_id - (required) is a type of string
  network_acl_id = var.network_acl_id

  dynamic "resources" {
    for_each = var.resources
    content {
      # resource_id - (required) is a type of string
      resource_id = resources.value["resource_id"]
      # resource_type - (required) is a type of string
      resource_type = resources.value["resource_type"]
    }
  }

}

top

Outputs

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

output "this" {
  value = alicloud_network_acl_attachment.this
}

top