terraform-provider-ucloud icon indicating copy to clipboard operation
terraform-provider-ucloud copied to clipboard

`ucloud_db_instance.instance_type` doc is missing PostgreSQL instance types

Open namoshizun opened this issue 4 years ago • 6 comments

https://docs.ucloud.cn/terraform/specification/db_instance

It only tells instance types of MySQL and I couldn't find any type specifications for PostgreSQL...

namoshizun avatar Oct 19 '21 07:10 namoshizun

I'm sorry about that, we will update the document later. At present, you can refer to the console to get the instance_type of PostgreSQL.

shawnmssu avatar Oct 19 '21 07:10 shawnmssu

@shawnmssu Hmmm I still cant find the literal representation (like, postgresql-ha-1) of PostgreSQL instance type on the console portal.. Could you point me out where the spec is?

namoshizun avatar Oct 19 '21 09:10 namoshizun

The instance_type of PostgreSQL just as you understand likepostgresql-ha-1 (engine-mode-memory), the spec is our docs, We just updated it .

shawnmssu avatar Oct 19 '21 09:10 shawnmssu

@shawnmssu

Thx~ just now tried with the following script

resource "ucloud_db_instance" "psql" {
  name              = "${local.common_prefix}-psql"
  availability_zone = data.ucloud_zones.default_zone.zones[0].id
  instance_storage  = 40
  instance_type     = "postgresql-ha-2"
  engine            = "postgresql"
  engine_version    = "10.4"
  port              = "5432"
  password          = random_password.psql_password.result
  vpc_id            = ucloud_vpc.vpc.id
  subnet_id         = ucloud_subnet.subnet.id
  charge_type       = "dynamic"
}

But then got this


Error: error on creating db instance, api:
[server.RetCodeError] 7111 This DB type does not support HA instance

PS: changing instance version to "9.6" worked tho

namoshizun avatar Oct 19 '21 09:10 namoshizun

@shawnmssu Another question. Is there "HA" the only supported type of instance? If I create the database via portal, both "HA" and "Normal" types are selectable

namoshizun avatar Oct 19 '21 09:10 namoshizun

Currently, our Terraform provider only supports the HA type of DB instance, about the Normal type we need to assess whether we need support.

shawnmssu avatar Oct 19 '21 10:10 shawnmssu