Skip to content

feat: support multi_az_with_standby_enabled for opensearch #196

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lukehsiao
Copy link

@lukehsiao lukehsiao commented Oct 10, 2024

feat: support multi_az_with_standby_enabled for opensearch

Note that this bumps the minimum hashicorp/aws provider version to
5.15.0, where this parameter was introduced [1].

The README diff was generated with make init and make readme, and
introduces some minor unrelated changes.

Closes: #195


what

This PR simply exposes a new variable (multi_az_with_standby_enabled) for OpenSearch clusters.

why

This is the recommended setting by AWS, so it makes sense to be able to do this via terraform.

references

Closes: #195

@lukehsiao lukehsiao requested review from a team as code owners October 10, 2024 23:35
@lukehsiao lukehsiao requested review from Gowiem and jamengual October 10, 2024 23:35
@mergify mergify bot added the triage Needs triage label Oct 10, 2024
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.

One request to confirm before we move this forward 👍

dedicated_master_enabled = var.dedicated_master_enabled
dedicated_master_count = var.dedicated_master_count
dedicated_master_type = var.dedicated_master_type
multi_az_with_standby_enabled = var.multi_az_with_standby_enabled
Copy link
Member

Choose a reason for hiding this comment

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

What version of the AWS provider was multi_az_with_standby_enabled added in? Does our current pin of the AWS provider in versions.tf require that version or above? Please look into this, update if needed, and then rerun the README generation with make init && make readme. Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the callout! It does need a minimum bump, the variable was introduced in https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#5150-august-31-2023. I've updated that value and run README generation. Note that that make readme fixes some things I missed when I did it manually, but also introduces some minor, seemingly unrelated changes (e.g., extra /).

@lukehsiao lukehsiao force-pushed the main branch 3 times, most recently from 0232f59 to a0c05dd Compare October 12, 2024 16:29
@lukehsiao lukehsiao requested a review from Gowiem October 12, 2024 16:29
@Gowiem Gowiem added enhancement New feature or request minor New features that do not break anything labels Oct 12, 2024
@Gowiem
Copy link
Member

Gowiem commented Oct 12, 2024

/terratest

@lukehsiao
Copy link
Author

I see some test failures, but looking at the logs, they don't look directly related to my change. If I'm responsible for getting these to passing, could anyone provide some guidance?

@Gowiem
Copy link
Member

Gowiem commented Feb 6, 2025

/terratest

@Gowiem Gowiem enabled auto-merge (squash) February 6, 2025 16:12
Gowiem
Gowiem previously approved these changes Feb 6, 2025
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.

:shipit:

@mergify mergify bot removed the triage Needs triage label Feb 6, 2025
@Gowiem Gowiem added the needs-cloudposse Needs Cloud Posse assistance label Feb 6, 2025
Copy link

mergify bot commented Feb 6, 2025

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@Gowiem
Copy link
Member

Gowiem commented Feb 6, 2025

@lukehsiao the tests for this child module need some action from the @cloudposse team as there is an issue with the tests failing to find some R53 records in their AWS account. I'll bring this up internally to the contributors group and we'll work to get someone on it shortly. Thanks for the patience!

@goruha
Copy link
Member

goruha commented Mar 20, 2025

@lukehsiao could you pls fix the code style formatting?
it seem there are some nonprintable chars (spaces or tabs) that need to be removed

diff --git a/variables.tf b/variables.tf
index 7b0d0b[5](https://github.com/cloudposse/terraform-aws-elasticsearch/actions/runs/13168882144/job/36798395645?pr=196#step:6:6)..63f2d31 100644
--- a/variables.tf
+++ b/variables.tf
@@ -143,[7](https://github.com/cloudposse/terraform-aws-elasticsearch/actions/runs/13168882144/job/36798395645?pr=196#step:6:8) +143,7 @@ variable "availability_zone_count" {
 
 variable "multi_az_with_standby_enabled" {
   type        = bool
-  default     = false  
+  default     = false
   description = "Enable domain with standby for OpenSearch cluster"
 }

@goruha goruha self-assigned this Mar 20, 2025
@lukehsiao
Copy link
Author

lukehsiao commented Mar 20, 2025

@lukehsiao could you pls fix the code style formatting? it seem there are some nonprintable chars (spaces or tabs) that need to be removed

diff --git a/variables.tf b/variables.tf
index 7b0d0b[5](https://github.com/cloudposse/terraform-aws-elasticsearch/actions/runs/13168882144/job/36798395645?pr=196#step:6:6)..63f2d31 100644
--- a/variables.tf
+++ b/variables.tf
@@ -143,[7](https://github.com/cloudposse/terraform-aws-elasticsearch/actions/runs/13168882144/job/36798395645?pr=196#step:6:8) +143,7 @@ variable "availability_zone_count" {
 
 variable "multi_az_with_standby_enabled" {
   type        = bool
-  default     = false  
+  default     = false
   description = "Enable domain with standby for OpenSearch cluster"
 }

Apologies. Making the change now.

update: this is done.

Note that this bumps the minimum `hashicorp/aws` provider version to
5.15.0, where this parameter was introduced [[1]].

The README diff was generated with `make init` and `make readme`, and
introduces some minor unrelated changes.

[1]: https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#5150-august-31-2023
Closes: cloudposse#195
auto-merge was automatically disabled March 20, 2025 18:09

Head branch was pushed to by a user without write access

@Gowiem
Copy link
Member

Gowiem commented Mar 24, 2025

/terratest

@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.35.0"
version = ">= 5.15.0"
Copy link
Member

Choose a reason for hiding this comment

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

If we're bumping to this version, this is considered a major version bump as it requires users to bump to a new provider version. Just calling that out explicitly here since this is now a larger change than just a new var + argument usage.  

@Gowiem Gowiem added major Breaking changes (or first stable release) and removed minor New features that do not break anything labels Mar 24, 2025
@Gowiem
Copy link
Member

Gowiem commented Mar 24, 2025

@goruha looks like we're still failing with the following, can you investigate?

TestExamplesComplete 2025-03-24T21:28:55Z retry.go:99: Returning due to fatal error: FatalError{Underlying: error while running command: exit status 1; ╷
│ Error: no matching Route 53 Hosted Zone found
│ 
│   with module.elasticsearch.module.domain_hostname.data.aws_route53_zone.default[0],
│   on .terraform/modules/elasticsearch.domain_hostname/main.tf line 5, in data "aws_route53_zone" "default":
│    5: data "aws_route53_zone" "default" {
│ 
╵
╷
│ Error: no matching Route 53 Hosted Zone found
│ 
│   with module.elasticsearch.module.kibana_hostname.data.aws_route53_zone.default[0],
│   on .terraform/modules/elasticsearch.kibana_hostname/main.tf line 5, in data "aws_route53_zone" "default":
│    5: data "aws_route53_zone" "default" {
│ 
╵}

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request major Breaking changes (or first stable release) needs-cloudposse Needs Cloud Posse assistance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multi_az_with_standby_enabled
3 participants