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

[Bug]: aws_elasticsearch_domain ebs_options throughput attribute populated for non-gp3 volume types? #32613

Closed
gracevivi523 opened this issue Jul 20, 2023 · 4 comments · Fixed by #32659
Labels
bug Addresses a defect in current functionality. service/elasticsearch Issues and PRs that pertain to the elasticsearch service.

Comments

@gracevivi523
Copy link
Contributor

gracevivi523 commented Jul 20, 2023

Terraform Core Version

v1.1.0

AWS Provider Version

v5.8.0

Affected Resource(s)

aws_elasticsearch_domain

Expected Behavior

If the ES domain created with gp3 as volume_type in aws_elasticsearch_domain.ebs_options, then when volume_type changed to gp2, no errors related to throughput arise, since the throughput attribute is only applicable to the gp3 volume type.

Actual Behavior

The ES domain created with gp3 as volume_type in aws_elasticsearch_domain.ebs_options, then when volume_type changed to gp2, getting the below error, and still getting same error even though explicitly setting throughput to null.

Error: ValidationException: Throughput is only valid when volume type is GP3.

Relevant Error/Panic Output Snippet

Error: ValidationException: Throughput is only valid when volume type is GP3.

Terraform Configuration Files

please ignore subnet_ids value

resource "aws_elasticsearch_domain" "es" {
  domain_name           = "es-testing"
  elasticsearch_version = "7.10"

  cluster_config {
    instance_type = "r5.2xlarge.elasticsearch"
  }
  snapshot_options {
    automated_snapshot_start_hour = 23
  }
  vpc_options {
    subnet_ids = [var.sg_id]
  }
  ebs_options {
    ebs_enabled = true
    volume_size = 400
    volume_type = var.volume_type
  }
}

Steps to Reproduce

Configure aws_elasticsearch_domain.cluster_config.instance_type to r5.2xlarge.elasticsearch
Run terraform apply

and then
Configure volume_type = "gp2"
Run terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

Same issue raised here with opensearch #27467

and resolved here #28862

Would you like to implement a fix?

Yes

@gracevivi523 gracevivi523 added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jul 20, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/elasticsearch Issues and PRs that pertain to the elasticsearch service. label Jul 20, 2023
@gracevivi523
Copy link
Contributor Author

I am interested to implement a fix.

@gracevivi523
Copy link
Contributor Author

put in a fix here by referencing #28862

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jul 24, 2023
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/elasticsearch Issues and PRs that pertain to the elasticsearch service.
Projects
None yet
2 participants