terraform-aws-rds icon indicating copy to clipboard operation
terraform-aws-rds copied to clipboard

Can you provide examples of Multi AZ DB cluster?

Open ianeinser opened this issue 2 years ago β€’ 10 comments

Is your request related to a new offering from AWS?

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.

  • No πŸ›‘: please wait to file a request until the functionality is avaialble in the AWS provider
  • Yes βœ…: please list the AWS provider version which introduced this functionality

Is your request related to a problem? Please describe.

Describe the solution you'd like.

Describe alternatives you've considered.

Additional context

ianeinser avatar Jun 07 '22 12:06 ianeinser

You have to specify multi_az = true as a module argument, and AWS RDS service will do the rest.

antonbabenko avatar Jun 07 '22 12:06 antonbabenko

hi @antonbabenko, currently there were 3 deployment options based on RDS docs here (see comparison table in the link). Also can be seen in AWS console while provisioning in UI.

  1. Single-AZ
  2. Multi-AZ with one standby (the standby just act as failover, does not serve read traffic)
  3. Multi-AZ with two readable standby

Using multi_az = true seems like deploying option 2 above. Does RDS terraform provider support option 3 above?

Saying so because I've just tried using multi_az = true and it was able to create with instance class db.t3.micro and option 3 only supports m and r classes (as seen in console UI).

rickychew77 avatar Jun 14 '22 03:06 rickychew77

hi @antonbabenko, currently there were 3 deployment options based on RDS docs here (see comparison table in the link). Also can be seen in AWS console while provisioning in UI.

  1. Single-AZ
  2. Multi-AZ with one standby (the standby just act as failover, does not serve read traffic)
  3. Multi-AZ with two readable standby

Using multi_az = true seems like deploying option 2 above. Does RDS terraform provider support option 3 above?

Saying so because I've just tried using multi_az = true and it was able to create with instance class db.t3.micro and option 3 only supports m and r classes (as seen in console UI).

which engine do you deploy @rickychew77 ?

agomezvidalee avatar Jun 16 '22 09:06 agomezvidalee

I am deploying to PostgreSQL @agomezvidalee

rickychew77 avatar Jun 16 '22 10:06 rickychew77

I am deploying to PostgreSQL @agomezvidalee

I used to use "https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html" for terraform value "replicate_source_db" may this helps to you "readme"

agomezvidalee avatar Jun 16 '22 10:06 agomezvidalee

@agomezvidalee thanks for the respond.

That seems to be just creating replica from source DB. Read docs here (see comparison table) as my first comment above there are 3 kinds of deployments, similar to what can be seen in AWS console while creating RDS instance.

The third option is what I want to achieve, closest thing that I can think of is to enable multi_az + read replica, possibly with RDA proxy. Not sure if there's just one argument to enable within aws_db_instance.

rickychew77 avatar Jun 16 '22 11:06 rickychew77

I just was using this module to deploy a mariadb instance (the master one) and then invoking the module to deploy the read one passing as parameter the master one. I guess this would work for your use case.

agomezvidalee avatar Jun 16 '22 13:06 agomezvidalee

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] avatar Jul 17 '22 00:07 github-actions[bot]

I believe the resource needed for the 3rd option is aws_rds_cluster. These attributes are needed for multi-az cluster support. Additional info: https://github.com/hashicorp/terraform-provider-aws/pull/23684

This option is not yet available in this module.

magreenbaum avatar Jul 17 '22 13:07 magreenbaum

HI, you can use this flag multi_az = true/false. I have created RDS previous using below module code, you can refer this link below rds module

ravindrasinghh avatar Jul 22 '22 14:07 ravindrasinghh

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] avatar Aug 22 '22 00:08 github-actions[bot]

This issue was automatically closed because of stale in 10 days

github-actions[bot] avatar Sep 02 '22 00:09 github-actions[bot]

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Nov 13 '22 02:11 github-actions[bot]