Skip to content

Latest commit

 

History

History
107 lines (82 loc) · 1.83 KB

alicloud_db_connection.md

File metadata and controls

107 lines (82 loc) · 1.83 KB

alicloud_db_connection

back

Index

Terraform

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

top

Example Usage

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

  # connection_prefix - (optional) is a type of string
  connection_prefix = null
  # instance_id - (required) is a type of string
  instance_id = null
  # port - (optional) is a type of string
  port = null
}

top

Variables

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

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

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

top

Resource

resource "alicloud_db_connection" "this" {
  # connection_prefix - (optional) is a type of string
  connection_prefix = var.connection_prefix
  # instance_id - (required) is a type of string
  instance_id = var.instance_id
  # port - (optional) is a type of string
  port = var.port
}

top

Outputs

output "connection_prefix" {
  description = "returns a string"
  value       = alicloud_db_connection.this.connection_prefix
}

output "connection_string" {
  description = "returns a string"
  value       = alicloud_db_connection.this.connection_string
}

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

output "ip_address" {
  description = "returns a string"
  value       = alicloud_db_connection.this.ip_address
}

output "this" {
  value = alicloud_db_connection.this
}

top