Skip to content

Latest commit

 

History

History
117 lines (91 loc) · 1.92 KB

opc_compute_storage_attachment.md

File metadata and controls

117 lines (91 loc) · 1.92 KB

opc_compute_storage_attachment

back

Index

Terraform

terraform {
  required_providers {
    opc = ">= 1.4.1"
  }
}

top

Example Usage

module "opc_compute_storage_attachment" {
  source = "./modules/opc/r/opc_compute_storage_attachment"

  # index - (required) is a type of number
  index = null
  # instance - (required) is a type of string
  instance = null
  # storage_volume - (required) is a type of string
  storage_volume = null

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

top

Variables

variable "index" {
  description = "(required)"
  type        = number
}

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

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

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

top

Resource

resource "opc_compute_storage_attachment" "this" {
  # index - (required) is a type of number
  index = var.index
  # instance - (required) is a type of string
  instance = var.instance
  # storage_volume - (required) is a type of string
  storage_volume = var.storage_volume

  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"]
    }
  }

}

top

Outputs

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

output "this" {
  value = opc_compute_storage_attachment.this
}

top