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

fix: reserved instances restrictions #244

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Conversation

oycyc
Copy link
Contributor

@oycyc oycyc commented Dec 11, 2024

what

This conditional check on whether or not to enable reserved instances is too restrictive. contains(["mysql", "postgresql"], local.reserved_instance_engine) is saying that only allow it if it is MySQL or PostgreSQL.

I think contains was originally meant to be like in the literal sense of "contains". Since in my case, I'm using aurora-postgresql, and it fails this check, yet it is one of the options for reserved instances.

why

endswith might be better, but it is TOO restrictive, seeing that there's so many options.
image
Additionally, Terraform will fail if user specifies the wrong engine type. There's no need for this check.

image

references

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_reserved_instance_offering

@oycyc oycyc requested review from a team as code owners December 11, 2024 19:36
@oycyc oycyc requested review from kevcube and gberenice December 11, 2024 19:36
@mergify mergify bot added the triage Needs triage label Dec 11, 2024
@Gowiem Gowiem added patch A minor, backward compatible change bugfix Change that restores intended behavior and removed triage Needs triage labels Dec 11, 2024
@Gowiem
Copy link
Member

Gowiem commented Dec 11, 2024

/terratest

Copy link
Member

@Gowiem Gowiem left a comment

Choose a reason for hiding this comment

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

Seems like solid logic that this was a mistake 👍

@oycyc
Copy link
Contributor Author

oycyc commented Dec 12, 2024

I can't see the particular check that says it's "cancelled", and I don't have permissions to merge either. Hoping a maintainer can jump in for an additional review + merge! (@gberenice maybe?)
image

@gberenice gberenice merged commit 75cc76a into cloudposse:main Dec 12, 2024
59 of 81 checks passed
Copy link

These changes were released in v1.15.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Change that restores intended behavior patch A minor, backward compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants