Skip to content
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

Adding mysql to engine_version validation #71

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

chipbell4
Copy link
Contributor

The validation we had was only valid for PostgreSQL and as a result prevented MySQL clusters from upgrading to the latest version of this module because their version string is formatted different (8.0.mysql_aurora.3.07.0 for example).

I think it would be pretty tough to validate this field. For your consideration, consider the output of
aws rds describe-db-engine-versions. At the time of writing, running this command gives 154 options for mysql and postgres alone. Given that terragrunt apply would catch this for us, I don't think it's really worth trying to validate against so many options.

The validation we had was only valid for PostgreSQL and as a result
prevented MySQL clusters from upgrading to the latest version of this
module because their version string is formatted different
(8.0.mysql_aurora.3.07.0 for example).

I think it would be pretty tough to validate this field. For your
consideration, consider the output of
`aws rds describe-db-engine-versions`. At the time of writing, running
this command gives 154 options for mysql and postgres alone. Given that
terragrunt apply would catch this for us, I don't think it's really
worth trying to validate against so many options.
@chipbell4 chipbell4 added the bug Something isn't working label Feb 27, 2025
@chipbell4 chipbell4 requested review from gsboueguia and a team February 27, 2025 16:55
@@ -53,7 +53,7 @@ variable "engine_mode" {
default = "provisioned"
type = string
validation {
condition = var.engine_mode == "provisioned" || var.engine_mode == "serverless"
condition = (var.engine_mode == "provisioned" || var.engine_mode == "serverless")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

terraform fmt made this update.

@chipbell4 chipbell4 changed the title Removing engine_version validation Adding mysql to engine_version validation Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant