back
terraform {
required_providers {
alicloud = ">= 1.120.0"
}
}
top
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
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 "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
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