tfwriter

Terraform HCL code generator.

Download as .zip Download as .tar.gz View on GitHub

alicloud_drds_instance

back

Index

Terraform

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

top

Example Usage

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

  # description - (required) is a type of string
  description = null
  # instance_charge_type - (optional) is a type of string
  instance_charge_type = null
  # instance_series - (required) is a type of string
  instance_series = null
  # specification - (required) is a type of string
  specification = null
  # vswitch_id - (required) is a type of string
  vswitch_id = null
  # zone_id - (required) is a type of string
  zone_id = null

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

top

Variables

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

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

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

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

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

variable "zone_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 "alicloud_drds_instance" "this" {
  # description - (required) is a type of string
  description = var.description
  # instance_charge_type - (optional) is a type of string
  instance_charge_type = var.instance_charge_type
  # instance_series - (required) is a type of string
  instance_series = var.instance_series
  # specification - (required) is a type of string
  specification = var.specification
  # vswitch_id - (required) is a type of string
  vswitch_id = var.vswitch_id
  # zone_id - (required) is a type of string
  zone_id = var.zone_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       = alicloud_drds_instance.this.id
}

output "this" {
  value = alicloud_drds_instance.this
}

top