postgres_db

airasia/postgres_db/google

Terraform Module HCL GOOGLE

Terraform module for a Postgres CloudSQL Instance in GCP

Install
module "postgres_db" {
source = "airasia/postgres_db/google"
version = "3.0.1"
}
plain text: /constructs/tfmod-airasia-postgres-db-google/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform module for a Postgres CloudSQL Instance in GCP Upgrade guide from v2.3.8 to v3.0.0 This upgrade requires google provider v4.74.0 or above which introduces the edition feature to google_sql_database_instance resources. Plan & Apply the google provider version upgrade first before upgrading this module version to v3.0.0. Terraform >= 1.3.0 is required as "optional" variables are used. Switched to using random_password to generate default passwords. With the 3.0.0 release, the random_id resource used to generate default passwords has been replaced with random_password resource. This improves the default behavior by generating stronger passwords as defaults. To continue using the previously generated password and prevent updates to the google_sql_user resources, specify the old passw

Inputs (49)
NameTypeDescriptionDefault
private_networkstringA VPC network (self-link) that can access the Postgres instance via private IP. required
name_suffixstringAn arbitrary suffix that will be added to the end of the resource name(s). For e required
instance_size_master_instancestringThe machine type/size of "Master" instance. See https://cloud.google.com/sql/doc"db-custom-1-3840"
instance_size_read_replicastringThe machine type/size of "ReadReplica" instances. See https://cloud.google.com/s"db-custom-1-3840"
disk_auto_resize_master_instanceboolWhether to increase disk storage size of the master instance automatically. Incrfalse
disk_auto_resize_limit_read_replicanumberThe maximum size to which storage can be auto increased for the read replica ins0
backup_enabledboolSpecify whether backups should be enabled for the Postgres instance.false
backup_locationstringA string value representing REGIONAL or MULTI-REGIONAL location for storing back""
region_read_replicastringThe region to launch the ReadReplica instance(s) in. Defaults to the master inst""
deletion_protection_master_instanceboolUsed to prevent from accidental deletion of the master instance across all surfatrue
default_db_namestringName of the default database to be created."default"
default_db_collationstringThe collation for the default database."en_US.UTF8"
disk_auto_resize_read_replicaboolWhether to increase disk storage size of the read replica instance(s) automaticafalse
region_master_instancestringThe region to launch the master instance in. Defaults to the Google provider's r""
public_access_read_replicaboolWhether public IPv4 address should be assigned to the Postgres read-replica instfalse
sql_proxy_user_groupslist(string)List of usergroup emails that maybe allowed to connect with the database using C[]
iam_userslist(object({ id = striA list of IAM users to be created in your CloudSQL instance[]
name_master_instancestringPortion of name to be generated for the "Master" instance. The same name of a de"v1"
db_versionstringThe Postgres database version to use. See https://cloud.google.com/sql/docs/post"POSTGRES_12"
editionstringThe edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.null
read_replica_countnumberSpecify the number of read replicas for the Postgres instance. Value greater tha0
zone_read_replicastringThe zone-letter to launch the ReadReplica instance(s) in. Options are "a" or "b""b"
… and 9 more inputs
Outputs (19)
instance_ip_address — The IPv4 address assigned for the master instance
replicas_instance_connection_names — The connection names of the replica instances to be used in connection strings
replicas_instance_self_links — The URIs of the replica instances
replicas_instance_server_ca_certs — The CA certificates information used to connect to the replica instances via SSL
instance_connection_name — The connection name of the master instance to be used in connection strings
instance_service_account_email_address — The service account email address assigned to the master instance
replicas_instance_service_account_email_addresses — The service account email addresses assigned to the replica instances
read_replica_instance_names — The instance names for the read replica instances
public_ip_address — The first public (PRIMARY) IPv4 address assigned for the master instance
usage_IAM_roles — Basic IAM role(s) that are generally necessary for using the resources in this module. See https://c
instance_name — The instance name for the master instance
instance_self_link — The URI of the master instance
root_user_name — The name of the root user
additional_users — The additional_users that were passed into this module.
private_ip_address — The first private (PRIVATE) IPv4 address assigned for the master instance
instance_first_ip_address — The first IPv4 address of the addresses assigned for the master instance.
instance_server_ca_cert — The CA certificate information used to connect to the SQL instance via SSL
replicas_instance_first_ip_addresses — The first IPv4 addresses of the addresses assigned for the replica instances
root_user_password — The password of the root user (auto-generated if var.root_user_password was not provided)
Resources (2)
google_project_iam_membergoogle_project_service
Details
FrameworkTerraform Module
LanguageHCL
Version3.0.1
Cloud GOOGLE
★ Stars0
Forks8
Total downloads30.7k
Inputs49
Outputs19
Resources2
LicenseGPL-3.0
Namespaceairasia
Updated