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 variable availability_zone_count #158

Open
Rodce opened this issue Apr 16, 2023 · 1 comment
Open

Fix variable availability_zone_count #158

Rodce opened this issue Apr 16, 2023 · 1 comment
Labels
invalid This doesn't seem right

Comments

@Rodce
Copy link

Rodce commented Apr 16, 2023

Describe the Bug

The README says

NOTE: To enable zone awareness to deploy Elasticsearch nodes into two different Availability Zones, you need to set zone_awareness_enabled to true and provide two different subnets in subnet_ids. If you enable zone awareness for your domain, Amazon ES places an endpoint into two subnets. The subnets must be in different Availability Zones in the same region. If you don't enable zone awareness, Amazon ES places an endpoint into only one subnet. You also need to set availability_zone_count to 1.

When I set the value of availability_zone_count to 1 I get an error because in the latest release you didn't correct variables.tf, namely you didn't comment out validation in availability_zone_count

variable "availability_zone_count" {
  type        = number
  default     = 2
  description = "Number of Availability Zones for the domain to use."

  **validation {
    condition     = contains([2, 3], var.availability_zone_count)
    error_message = "The availibility zone count must be 2 or 3."
  }**
}

Expected Behavior

When setting availability_zone_count = 1, I shouldn't get an error

var.availability_zone_count is 1
The availability zone count must be 2 or 3.

Steps to Reproduce

set variable
availability_zone_count = 1

Screenshots

No response

Environment

No response

Additional Context

No response

@Rodce Rodce added the bug 🐛 An issue with the system label Apr 16, 2023
@Nuru Nuru added do not merge Do not merge this PR, doing so would cause problems and removed do not merge Do not merge this PR, doing so would cause problems labels Apr 19, 2023
@Nuru
Copy link
Contributor

Nuru commented Apr 19, 2023

You also need to set availability_zone_count to 1.

I believe this is incorrect.

Users should be able to set zone_awareness_enabled to false and leave availability_zone_count unset and defaulted to 2, or set to 2 if the configuration of the root module makes leaving it unset too difficult.

@Nuru Nuru added invalid This doesn't seem right and removed bug 🐛 An issue with the system labels Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants