Skip to content

cloud-labs-infra/terraform-huaweicloud-rds-postgres

Repository files navigation

Huawei Cloud Relational Database Service PostgreSQL

Requirements

Name Version
terraform ~> 1.7
huaweicloud ~>1.63

Providers

Name Version
huaweicloud ~>1.63

Modules

No modules.

Resources

Name Type
huaweicloud_rds_database.main resource
huaweicloud_rds_instance.main resource
huaweicloud_rds_parametergroup.main resource
huaweicloud_rds_read_replica_instance.replica resource
huaweicloud_availability_zones.zones data source
huaweicloud_rds_flavors.flavor data source
huaweicloud_rds_flavors.flavor_replica data source

Inputs

Name Description Type Default Required
availability_zone_replica Specifies the AZ name for RDS Read Replica Instance, if omitted, AZ calculates automatically list(string) [] no
availability_zones Specifies the AZ name, if omitted, AZ calculates automatically list(string) [] no
databases Specifies Database resource within HuaweiCloud RDS Postgres instance:
* key - specifies the database name;
* character_set - specifies the character set used by the database;
* description - specifies the database description.
map(object({
character_set = optional(string, "UTF8")
description = optional(string, null)
}))
{} no
flavors Specifies the specification code of instance flavor.
Services will be interrupted for 5 to 10 minutes when you change RDS instance flavor.
If flavor is omitted, it'll calculated automatically.

https://support.huaweicloud.com/intl/en-us/productdesc-rds/rds_01_0035.html
object({
ha = optional(string, null)
single = optional(string, null)
replica = optional(string, null)
})
{
"ha": "rds.pg.n1.large.2.ha",
"replica": "rds.pg.n1.large.2.rr",
"single": "rds.pg.n1.large.2"
}
no
ha_replication_mode Specifies the replication mode for the standby DB instance string "async" no
instance_mode Specifies the mode of db instance - 'single' or 'ha' string "single" no
instance_replica_type Specifies the parameters of RDS Read Replica Instance to calculate flavor automatically, if flavors.replica is omitted

* vcpus - Specifies the number of vCPUs in the RDS flavor;
* memory - Specifies the memory size(GB) in the RDS flavor;
* group_type - Specifies the performance specification,
the valid values are as follows:

* normal: General enhanced;
* normal2: General enhanced type II;
* armFlavors: KunPeng general enhancement;
* dedicatedNormal: (dedicatedNormalLocalssd): Dedicated for x86;
* armLocalssd: KunPeng general type;
* normalLocalssd: x86 general type;
* general: General type;
* dedicated: only supported by cloud disk SSD;
* rapid: only supported by ultra-fast SSDs;
* bigmem: Large memory type.
object({
vcpus = optional(number, null)
memory = optional(number, null)
group_type = optional(string, "general")
})
{
"group_type": "general",
"memory": 4,
"vcpus": 2
}
no
instance_type Specifies the parameters of DB instance to calculate flavor automatically, if flavors.[type] is omitted

* vcpus - Specifies the number of vCPUs in the RDS flavor;
* memory - Specifies the memory size(GB) in the RDS flavor;
* group_type - Specifies the performance specification,
the valid values are as follows:

* normal: General enhanced;
* normal2: General enhanced type II;
* armFlavors: KunPeng general enhancement;
* dedicatedNormal: (dedicatedNormalLocalssd): Dedicated for x86;
* armLocalssd: KunPeng general type;
* normalLocalssd: x86 general type;
* general: General type;
* dedicated: only supported by cloud disk SSD;
* rapid: only supported by ultra-fast SSDs;
* bigmem: Large memory type.
object({
vcpus = optional(number, null)
memory = optional(number, null)
group_type = optional(string, "general")
})
{
"group_type": "general",
"memory": 4,
"vcpus": 2
}
no
name Specifies the name of the RDS instance string n/a yes
name_postfix Specifies the name postfix of the RDS instance string null no
parameter_group_values Parameter group values key/value pairs defined by users based on the default parameter groups map(string) {} no
password Specifies the database password string "VerY_5tr0nG-Pa55w0R^d" no
port Specifies the database port number 5432 no
postgres_version Indicates the postgresql version string "14" no
region Specifies the region in which to create the resource, if omitted, the provider-level region will be used string null no
replica Enabler for read replica instance bool false no
security_group_id Specifies the security group which the RDS DB instance belongs to string n/a yes
subnet_id Specifies the network id of a subnet string n/a yes
tags Specifies the key/value pairs to associate with the Object Storage map(string) {} no
time_zone Specifies the UTC time zone string null no
volume Specifies the volume information:

* size - Specifies the volume size. Its value range is from 40 GB to 4000 GB.
The value must be a multiple of 10 and greater than the original size.
* type - Specifies the volume type. Its value can be any of the following and is case-sensitive:
* ULTRAHIGH: SSD storage;
* LOCALSSD: local SSD storage
* CLOUDSSD: cloud SSD storage, this storage type is supported only with general-purpose and dedicated DB instances;
* ESSD: extreme SSD storage.
object({
size = optional(number, 50)
type = optional(string, "CLOUDSSD")
disk_encryption_id = optional(string, null)
})
{} no
vpc_id Specifies the VPC ID string n/a yes

Outputs

Name Description
id RDS PostgreSQL instance ID
password RDS PostgreSQL Password
port RDS PostgreSQL instance port
private_ips RDS PostgreSQL instance private IPs
public_ips RDS PostgreSQL instance public IPs
user_name RDS PostgreSQL User name

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages