ucloud/terraform-provider-ucloud

`ucloud_db_instance.instance_type` doc is missing PostgreSQL instance types

namoshizun opened this issue · 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...

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
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?

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

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

@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

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