Skip to content

Latest commit

 

History

History
96 lines (73 loc) · 1.55 KB

alicloud_disk_attachment.md

File metadata and controls

96 lines (73 loc) · 1.55 KB

alicloud_disk_attachment

back

Index

Terraform

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

top

Example Usage

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

  # device_name - (optional) is a type of string
  device_name = null
  # disk_id - (required) is a type of string
  disk_id = null
  # instance_id - (required) is a type of string
  instance_id = null
}

top

Variables

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

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

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

top

Resource

resource "alicloud_disk_attachment" "this" {
  # device_name - (optional) is a type of string
  device_name = var.device_name
  # disk_id - (required) is a type of string
  disk_id = var.disk_id
  # instance_id - (required) is a type of string
  instance_id = var.instance_id
}

top

Outputs

output "device_name" {
  description = "returns a string"
  value       = alicloud_disk_attachment.this.device_name
}

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

output "this" {
  value = alicloud_disk_attachment.this
}

top