Open AdamTylerLynch opened 3 years ago
Hi @AdamTylerLynch , So the thing is the SDK depends on the ES team to update their API, so we are kind of stuck depending on them... We'll add them as soon as we can.
@AdamTylerLynch I'm curious to understand why/how the lack of those instances in the go SDK source code is preventing the terraform AWS provider from working with Graviton instances?
A colleague initially reported that he couldn't use Graviton with AWS ES through terraform. The error was:
Error: InvalidTypeException: Invalid instance type: r6g.large.elasticsearch
I found this issue here and asked that it be looked into through an AWS premium support ticket (since we wanted Graviton).
But I now see that the real root cause of our problem was because the minimal version requirement of using ES 7.9 wasn't met when he tried to modify the domain to use graviton instances. We are currently terraforming AWS ES domains with graviton instances without any issues, if we meet the requirements.
Hence why I'm not sure how this list is used and why it needs to be updated to "implement ElasticSearch in Terraform provider for AWS", this change is clearly not mandatory to use terraform ES domain with Gravitons. I'm missing something though because you probably know more than I do about that and there is indeed such a list in the source code and it IS missing some instance types.
Also FYI, since this issue is not actually preventing us from using graviton on ES domain through terraform, I have said to AWS premium support that they can close my support ticket where I was pointing them here.
Regarding Terraform support for Graviton2 instances, the AWS provider for Terraform does not validate user input for instance type against the AWS GoSDK list ESPartitionInstanceType_Values
. Terraform users are able to launch ElasticSearch domains using Graviton2 instances in Regions/AZs that have Graviton2 instances available and where ES supports Graviton2 instances.
P123922644
Re-assigning. Relevant point in model that needs fixing https://github.com/aws/aws-sdk-go-v2/blob/1fe8c9e878a2f909704831729451710b918eeae5/codegen/sdk-codegen/aws-models/elasticsearch-service.json#L4650
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug The ElasticSearch API does not have the latest supported Graviton (R6, M6, C6) instances in
ESPartitionInstanceType_Values
Go SDK API: https://github.com/aws/aws-sdk-go/blob/main/service/elasticsearchservice/api.go
Supported ES Instance Types: https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html
Version of AWS SDK for Go? Example: v1.38.55
aws.SDKVersion
in your code after importing"github.com/aws/aws-sdk-go/aws"
Version of Go (
go version
)? go version go1.16.3 darwin/amd64To Reproduce (observed behavior) Look at the
ESPartitionInstanceType_Values
enum in https://github.com/aws/aws-sdk-go/blob/main/service/elasticsearchservice/api.goExpected behavior Full enums with: ESPartitionInstanceTypeM6 ESPartitionInstanceTypeR6 ESPartitionInstanceTypeC6
Additional context Looking to have this change so we can implement ElasticSearch in Terraform provider for AWS.