Skip to content

Latest commit

 

History

History
138 lines (109 loc) · 2.35 KB

ecl_compute_volume_attach_v2.md

File metadata and controls

138 lines (109 loc) · 2.35 KB

ecl_compute_volume_attach_v2

back

Index

Terraform

terraform {
  required_providers {
    ecl = ">= 2.0.0"
  }
}

top

Example Usage

module "ecl_compute_volume_attach_v2" {
  source = "./modules/ecl/r/ecl_compute_volume_attach_v2"

  # device - (optional) is a type of string
  device = null
  # region - (optional) is a type of string
  region = null
  # server_id - (required) is a type of string
  server_id = null
  # volume_id - (required) is a type of string
  volume_id = null

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

top

Variables

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

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

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

variable "volume_id" {
  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 "ecl_compute_volume_attach_v2" "this" {
  # device - (optional) is a type of string
  device = var.device
  # region - (optional) is a type of string
  region = var.region
  # server_id - (required) is a type of string
  server_id = var.server_id
  # volume_id - (required) is a type of string
  volume_id = var.volume_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"]
    }
  }

}

top

Outputs

output "device" {
  description = "returns a string"
  value       = ecl_compute_volume_attach_v2.this.device
}

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

output "region" {
  description = "returns a string"
  value       = ecl_compute_volume_attach_v2.this.region
}

output "this" {
  value = ecl_compute_volume_attach_v2.this
}

top