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

feat: Support no read-replication for Memorystore [DEVOP-4801] #18

Merged

Conversation

ChristianWitts
Copy link
Contributor

@ChristianWitts ChristianWitts commented Jul 19, 2024

Pull Request Submission Checklist

Please confirm that you have done the following before requesting reviews:

  • I have confirmed that the PR type is appropriate for the change I am making according to the Honest Pull Request and Commit Message Naming Conventions.
  • I have typed an adequate description that explains why I am making this change.
  • I have installed and run standard pre-commit hooks that lints and validates my code.

Description

In order to right-size the current Memorystore instances, we need to not
enforce read-replica contraints as at minimum you require 5GB in order
to enable a read-replica, yet current production instances are utilising
less than 1GB.

Refs: #DEVOP-4801

Signed-off-by: Christian Witts christian@honestbank.com


This change is Reviewable

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Terraform Plan 📖failure

Show Plan

Pusher: @ChristianWitts, Action: pull_request, Working Directory: ``, Workflow: terraform

@ChristianWitts ChristianWitts force-pushed the christian/devop-4801-support-no-read-replication branch from f96bb6a to 175b7a1 Compare July 19, 2024 07:53
@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Terraform Plan 📖failure

Show Plan

Pusher: @ChristianWitts, Action: pull_request, Working Directory: ``, Workflow: terraform

bibek4699
bibek4699 previously approved these changes Jul 19, 2024
Sagart-cactus
Sagart-cactus previously approved these changes Jul 19, 2024
@ChristianWitts ChristianWitts enabled auto-merge (squash) July 19, 2024 09:17
@ChristianWitts ChristianWitts force-pushed the christian/devop-4801-support-no-read-replication branch from 175b7a1 to 38c6fe9 Compare July 24, 2024 04:28
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jul 24, 2024
@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Terraform Plan 📖failure

Show Plan

Pusher: @ChristianWitts, Action: pull_request, Working Directory: ``, Workflow: terraform

@ChristianWitts ChristianWitts force-pushed the christian/devop-4801-support-no-read-replication branch from 38c6fe9 to 733267d Compare July 24, 2024 04:31
@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Terraform Plan 📖failure

Show Plan

Pusher: @ChristianWitts, Action: pull_request, Working Directory: ``, Workflow: terraform

MXfive
MXfive previously approved these changes Jul 24, 2024
condition = var.replicas >= 1 && var.replicas <= 5
error_message = "The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 1."
condition = var.replicas <= 5
error_message = "The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 0 as the default is zero read-replicas."
Copy link

Choose a reason for hiding this comment

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

Since 1.9 you can do cross input variable references in input validations. So can make conditional based on the tier here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh nice, that's nice to know. I rewrote the validations as preconditions on the resource.

@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Terraform Plan 📖failure

Show Plan

Pusher: @ChristianWitts, Action: pull_request, Working Directory: ``, Workflow: terraform

Refs: #DEVOP-4801

Signed-off-by: Christian Witts <christian@honestbank.com>
@ChristianWitts ChristianWitts force-pushed the christian/devop-4801-support-no-read-replication branch from 314cb98 to 8087bcb Compare July 24, 2024 07:34
@honestbank-bot
Copy link
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

Terraform Plan 📖failure

Show Plan

Pusher: @ChristianWitts, Action: pull_request, Working Directory: ``, Workflow: terraform

@@ -13,11 +13,14 @@ resource "random_id" "instance_suffix" {
}

module "private_network" {
#checkov:skip=CKV_TF_1:We use the version tag instead of the commit hash
Copy link

Choose a reason for hiding this comment

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

I thought we skip examples for checkov?

@ChristianWitts ChristianWitts merged commit 6aec71a into main Jul 24, 2024
6 checks passed
@ChristianWitts ChristianWitts deleted the christian/devop-4801-support-no-read-replication branch July 24, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants