-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
aws_opensearch_domain ebs_options throughput attribute populated for non-gp3 volume types? [Bug]: #27467
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I was able to reproduce this by:
I believe is caused by the computed terraform-provider-aws/internal/service/opensearch/flex.go Lines 72 to 95 in 165566e
One option is to conditionally set the |
This functionality has been released in v4.51.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Terraform Core Version
1.3.3
AWS Provider Version
4.36.1
Affected Resource(s)
Expected Behavior
volume_type
attribute toaws_opensearch_domain.ebs_options
, and set it tostandard
, no errors related tothroughput
arise, since thethroughput
attribute is only applicable to the gp3 volume type.Actual Behavior
When I add the
volume_type
attribute toaws_opensearch_domain.ebs_options.volume_type
, and set it tostandard
(orgp2
), I get the error:Error: ValidationException: Throughput is only valid when volume type is GP3.
I get the same error if I explicitly set
throughput
tonull
. I searched existing issues, and google for anything useful but came up dry & this issue did not seem to exist in this system.Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Here's the relevant config. Note that this started because I changed the value of the incoming instance_type variable from a t3-class instance to an m4.xlarge.search instance type. At that time, ebs_options only had
ebs_enabled
andvolume_size
attributes, and I got the errorError: ValidationException: EBS volume-types :[standard, io1, gp2] must be selected for m4.xlarge.search
. So I added avolume_type
attribute and that's when I got the error I'm reporting about here:Error: ValidationException: Throughput is only valid when volume type is GP3.
.This config will generate the error
Error: ValidationException: Throughput is only valid when volume type is GP3.
if the instance_type is set tom4.xlarge.search
.Steps to Reproduce
Debug Output
If I don't add the volume_type attribute, but my instance type is m4.xlarge.search, I get the error
Error: ValidationException: EBS volume-types :[standard, io1, gp2] must be selected for m4.xlarge.search
, and the debug log shows the following:When I add
volume_type
and set it tostandard
and don't add athroughput
attribute, or explicitly setthroughput
tonull
, the debug log shows this:It appears that
throughput
is set to125
as a default and cannot be overridden by a null, and is applied to volume_types for which that option is not appropriate.Panic Output
No response
Important Factoids
I'm new to tf, but I don't think I'm doing anything exotic here.
References
Both the tf provider docs & the AWS docs say that
throughput
is only applicable to gp3 volume type. It is not an option for any other volume_type.https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/opensearch_domain#throughput
https://docs.aws.amazon.com/opensearch-service/latest/developerguide/configuration-api.html
Would you like to implement a fix?
No response
The text was updated successfully, but these errors were encountered: