-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_db_instance: Move create/delete/update pending states to their own variables and add storage-optimization #2409
Conversation
…own variables and add storage-optimization
Hi @bflad
Moving it to
I can't think of any reason, probably just a new state that popped up recently and nobody noticed. Do you mind adding it?
Sounds like a good idea, please add them. 👍 In regards to the code, I have mixed feelings about decoupling the slices from the CRUD. I don't see much value in such decoupling and I'm slightly more inclined to keeping it as is (i.e. within functions), but I won't block the PR on this - just a thought/opinion to consider. |
I was on the fence about this, however I was thinking it was nice to:
I can change it back though and add the documentation in each of the spots if you wish. I definitely don't want to hold this up. I'll address the other items in the meantime. |
…o create/update target state, add configuring-enhanced-monitoring/starting/stopping pending states
PR updated! 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
I will merge this after we ship 1.5.0 with MQ support later today - i.e. this bugfix will be part of 1.5.1
.
So when can 1.5.1 be expected to be released? Currently I can't even create Postgres instances with gp2 storage. MySQL instances with gp2 seem to work fine. I think they both go through the Here's their configurations, they are almost identical resource "aws_db_instance" "mysql" {
count = "${var.enabled == "true" ? 1 : 0}"
identifier = "mysql-${var.build_name}-${var.build_env}"
snapshot_identifier = "${join("", data.aws_db_snapshot.mysql.*.id)}"
engine = "mariadb"
allocated_storage = 50
storage_type = "gp2"
engine_version = "${var.maria_version["full"]}"
instance_class = "${var.instance_type}"
password = "${local.mysql_password}"
db_subnet_group_name = "${join("", aws_db_subnet_group.main.*.name)}"
parameter_group_name = "${join("", aws_db_parameter_group.mysql.*.name)}"
option_group_name = "${join("", aws_db_option_group.mysql.*.name)}"
skip_final_snapshot = true
tags = "${merge(var.default_tags, map(
"Name", "${var.name_tag_prefix}-mysql"
))}"
}
resource "aws_db_instance" "postgres" {
count = "${var.enabled == "true" ? 1 : 0}"
identifier = "postgres-${var.build_name}-${var.build_env}"
snapshot_identifier = "${join("", data.aws_db_snapshot.postgres.*.id)}"
engine = "postgres"
allocated_storage = 50
storage_type = "gp2"
engine_version = "${var.postgres_version["full"]}"
instance_class = "${var.instance_type}"
password = "${local.postgres_password}"
db_subnet_group_name = "${join("", aws_db_subnet_group.main.*.name)}"
parameter_group_name = "${join("", aws_db_parameter_group.postgres.*.name)}"
option_group_name = "${join("", aws_db_option_group.postgres.*.name)}"
skip_final_snapshot = true
tags = "${merge(var.default_tags, map(
"Name", "${var.name_tag_prefix}-postgres"
))}"
}``` |
…own variables and add storage-optimization (hashicorp#2409) * r/aws_db_instance: Move create/delete/update pending states to their own variables and add storage-optimization * r/aws_db_instance: hashicorp#2409 review: move storage-optimization to create/update target state, add configuring-enhanced-monitoring/starting/stopping pending states
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Closes #2408
There are some things that should be noted though, according to the DB Instance Status docs:
storage-optimization
: "The storage optimization process is usually short, but can sometimes take up to and even beyond 24 hours." Likely this means this will generally hit the timeout. Should this status be moved to theresource.StateChangeConf
Target
instead?configuring-enhanced-monitoring
is not in delete pending states?stopping
andstarting
in any of the pending states, should we add them? There might be others too.Thoughts and opinions on the above are appreciated!