Is it possible to create RDS SQL Server Multi-AZ?

1,091 views
Skip to first unread message

Rajinder Singh

unread,
Dec 16, 2015, 12:01:49 AM12/16/15
to Terraform
I am trying to create a multi-az instance of AWS RDS SQLServer.

terraform apply resulted in this error.

* aws_db_instance.qa_sql_db: Error creating DB Instance: InvalidParameterCombination: To configure Multi-AZ for SQL Serv
er DB Instances please apply or remove the "Mirroring" option using Option Groups.
        status code: 400, request id: 695aa2aa-a3af-11e5-9949-7da928f7789c


AWS documentation states that I need to create Options Group and specify mirroring option.


They give example of using option group:

rds-create-option-group MirroringOG --engine-name sqlserver-se --major-engine-version 10.50 --description "SQLServer Mirroring"


rds-add-option-to-option-group MirroringOG --option-name Mirroring 


rds-modify-db-instance cust_instance_id -og MirroringOG --apply-immediately  



I have looked at the Terraform aws rds documentation and I don't see options group. The closest thing I see is db_parameters_group


I am not sure it is same as options group.

Has anyone done this before? Can you share an example of setting up mirroring necessary to provision a multi-az SQL Server?

Thanks

Rajinder Singh

unread,
Dec 18, 2015, 12:29:09 PM12/18/15
to Terraform
I was able to successfully provision RDS SQL Multiaz.
Since the current Terraform RDS settings did not allow me to do this created RDS SQL Server in 1 AZ and called a local provisioner with the following command.

aws rds modify-db-instance --db-instance-identifier ${var.db_name}  --option-group-name default:sqlserver-se-12-00-mirrored --region ${var.region} --apply-immediately

I really like the simplicity and power of Terraform. It is significantly easier to learn and use as compared with Azure ARM Templates and AWS Cloud Formation.

Baraa Basata

unread,
Dec 20, 2015, 1:29:43 AM12/20/15
to Terraform
Sounds like it would be a nice addition to allow the aws_rds_instance resource to take an option group name.

-Baraa

Rajinder Singh

unread,
Dec 20, 2015, 10:45:23 AM12/20/15
to Terraform
I created an issue in GitHub for this.

Reply all
Reply to author
Forward
0 new messages