tfwriter

Terraform HCL code generator.

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

alicloud_kvstore_connection

back

Index

Terraform

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

top

Example Usage

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

  # connection_string_prefix - (required) is a type of string
  connection_string_prefix = null
  # instance_id - (required) is a type of string
  instance_id = null
  # port - (required) is a type of string
  port = null

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

top

Variables

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

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

variable "port" {
  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_kvstore_connection" "this" {
  # connection_string_prefix - (required) is a type of string
  connection_string_prefix = var.connection_string_prefix
  # instance_id - (required) is a type of string
  instance_id = var.instance_id
  # port - (required) is a type of string
  port = var.port

  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 "connection_string" {
  description = "returns a string"
  value       = alicloud_kvstore_connection.this.connection_string
}

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

output "this" {
  value = alicloud_kvstore_connection.this
}

top