-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Aurora - Crashing - Multi AZ Issues #5418
Comments
Upon further digging it seems my second issue is related to the following: |
Hi @boxrick - sorry about the trouble here! Digging in now and will follow up when I have more info for you. |
Full config reproducing issue (1) in us-west-2: variable "azs" {
default = "us-west-2a,us-west-2b"
}
resource "aws_vpc" "main" {
cidr_block = "10.123.0.0/16"
}
resource "aws_subnet" "private" {
vpc_id = "${aws_vpc.main.id}"
count = "${length(split(",", var.azs))}"
availability_zone = "${element(split(",", var.azs), count.index)}"
cidr_block = "10.123.${count.index}.0/24"
}
# Group for assigning rds instance to subnets
resource "aws_db_subnet_group" "aurora" {
name = "phinze-test-db-subnetgroup"
description = "it is silly that this is required in the API"
subnet_ids = ["${aws_subnet.private.*.id}"]
}
resource "aws_rds_cluster" "default" {
cluster_identifier = "phinze-test-cluster-aurora"
availability_zones = ["us-west-2a","us-west-2b"]
database_name = "mydb"
master_username = "myuser"
master_password = "longerthan8chars"
db_subnet_group_name = "${aws_db_subnet_group.aurora.name}"
}
resource "aws_rds_cluster_instance" "aurora_instance" {
identifier = "phinze-test-cluster-instance-aurora"
cluster_identifier = "${aws_rds_cluster.default.id}"
instance_class = "db.r3.large"
db_subnet_group_name = "${aws_db_subnet_group.aurora.name}"
} |
Okay looks like the AZ issue is an upstream API problem: https://gist.github.com/phinze/34c87dc974e70681a41a I've reached out to AWS Support about this and will report what I hear. Digging into (2) now. |
I ultimately got around this by using 3azs, I'm happy to share the config for that. However this is still one to be fixed. |
@boxrick yeah looks like at the moment the AWS API doesn't listen to the AvailabilityZones parameter and always returns the full set of active AZs in your region. So current workaround is to either specify all of them or omit it from the resource and let it be a computed value. |
Okay just found #3754 which has more discussion around the AZs issue, and closed the crasher in #5717. So I believe the best thing to do here is to close this and consolidate conversation around the original AZs issue in #3754. Let me know if you feel like there's anything else outstanding that needs to be tracked here though! 👍 |
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. |
When using AWS Provider for Aurora ( AWS_RDS_CLUSTER & AWS_RDS_CLUSTER_INSTANCE ) I am having multiple issues:
Each time I provision an Aurora instance, it creates it in 3 AZ even though I specify only 2. Then each time I re-run it destroys and re-creates because it tries to make it in 2 but then makes it in 3 again.
https://gist.github.com/boxrick/12758f0d67d1a64c01e8
Provisioning Aurora similar to the example on https://www.terraform.io/docs/providers/aws/r/rds_cluster_instance.html. Results in all sorts of !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!! & panic: runtime error: invalid memory address or nil pointer dereference. This has ruined various of my configurations and deployments controlled by Terraform.
The text was updated successfully, but these errors were encountered: