Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ucloud_db_instance.instance_type doc is missing PostgreSQL instance types #106

Open
namoshizun opened this issue Oct 19, 2021 · 6 comments

Comments

@namoshizun
Copy link

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

@shawnmssu
Copy link
Collaborator

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.

@namoshizun
Copy link
Author

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

@shawnmssu
Copy link
Collaborator

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

@namoshizun
Copy link
Author

namoshizun commented Oct 19, 2021

@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
Copy link
Author

@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

@shawnmssu
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants