Skip to content

Latest commit

 

History

History
112 lines (87 loc) · 1.87 KB

oci_core_route_table_attachment.md

File metadata and controls

112 lines (87 loc) · 1.87 KB

oci_core_route_table_attachment

back

Index

Terraform

terraform {
  required_providers {
    oci = ">= 4.21.0"
  }
}

top

Example Usage

module "oci_core_route_table_attachment" {
  source = "./modules/oci/r/oci_core_route_table_attachment"

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

  timeouts = [{
    create = null
    delete = null
    update = null
  }]
}

top

Variables

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

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

variable "timeouts" {
  description = "nested block: NestingSingle, min items: 0, max items: 0"
  type = set(object(
    {
      create = string
      delete = string
      update = string
    }
  ))
  default = []
}

top

Resource

resource "oci_core_route_table_attachment" "this" {
  # route_table_id - (required) is a type of string
  route_table_id = var.route_table_id
  # subnet_id - (required) is a type of string
  subnet_id = var.subnet_id

  dynamic "timeouts" {
    for_each = var.timeouts
    content {
      # create - (optional) is a type of string
      create = timeouts.value["create"]
      # delete - (optional) is a type of string
      delete = timeouts.value["delete"]
      # update - (optional) is a type of string
      update = timeouts.value["update"]
    }
  }

}

top

Outputs

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

output "this" {
  value = oci_core_route_table_attachment.this
}

top