Skip to content

Commit

Permalink
Fix comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Mar 25, 2022
1 parent 7ef3487 commit c47a570
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/service/elasticsearch/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,9 @@ func resourceDomainUpdate(d *schema.ResourceData, meta interface{}) error {
input.ElasticsearchClusterConfig = expandClusterConfig(m)

// Work around "ValidationException: Your domain's Elasticsearch version does not support cold storage options. Upgrade to Elasticsearch 7.9 or later.".
if want, err := gversion.NewVersion("7.9"); err != nil {
if got, err := gversion.NewVersion(d.Get("elasticsearch_version").(string)); err != nil {
if got.GreaterThanOrEqual(want) {
if want, err := gversion.NewVersion("7.9"); err == nil {
if got, err := gversion.NewVersion(d.Get("elasticsearch_version").(string)); err == nil {
if got.LessThan(want) {
input.ElasticsearchClusterConfig.ColdStorageOptions = nil
}
}
Expand Down

0 comments on commit c47a570

Please sign in to comment.