俺です。
terraform v0.6.11で書いたやつです。
subnetは自分で作ってねという。
任意のwriter nodeとparameter groupを指定できないのが痛い。
ただwriter nodeのfailoverは40秒ぐらいで終わるので作った後ターゲットのAZでなければ手動failしてしまえばよいかなと。
resource "aws_rds_cluster_instance" "aurorasaikou" { cluster_identifier = "${aws_rds_cluster.aurorasaikou.id}" identifier = "${aws_rds_cluster.aurorasaikou.cluster_identifier}-${count.index}" instance_class = "db.r3.large" db_subnet_group_name = "${aws_db_subnet_group.backend.name}" publicly_accessible = false count = 3 depends_on = ["aws_db_subnet_group.backend"] } resource "aws_rds_cluster" "aurorasaikou" { cluster_identifier = "aurorasaikou" availability_zones = ["ap-northeast-1a", "ap-northeast-1c"] database_name = "aurorasaikou" master_username = "aurorasaikouuser" master_password = "Aurorasa1ko%" final_snapshot_identifier = true port = 3306 apply_immediately = true vpc_security_group_ids = [""${aws_security_group.default.id}"] db_subnet_group_name = "backend" }
完