hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.81k stars 9.16k forks source link

Elasticache Replication Group InvalidParameterCombination: No modifications were requested #16564

Closed Zogoo closed 3 years ago

Zogoo commented 3 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Terraform: 0.12.26 AWS provider: 3.19

Affected Resource(s)

Debug Output

terraform plan will show following output

 # module.redis.aws_elasticache_replication_group.sidekiq will be updated in-place
  ~ resource "aws_elasticache_replication_group" "sidekiq" {
        at_rest_encryption_enabled    = false
        auto_minor_version_upgrade    = true
        automatic_failover_enabled    = true
        engine                        = "redis"
      ~ engine_version                = "6.0.5" -> "6.x"
        id                            = "****-cluster-elastic-cache"
        maintenance_window            = "sat:17:00-sat:18:00"
}

Panic Output

terraform apply fail with following message

Error: error updating Elasticache Replication Group (****-cluster-elastic-cache): InvalidParameterCombination: No modifications were requested
    status code: 400, request id: b87ad43c-9781-4db8-9b2c-28fa2f182355

Expected Behavior

Should apply without resource modification.

Actual Behavior

Failing with message mentioned in "Panic Output" part.

Steps to Reproduce

Any aws_elasticache_replication_group with REDIS 6.X version

  1. terraform apply

Important Factoids

It seems like Terraform state hold version number after resource applied to AWS when first time create AWS environments. Second apply fail with because you cannot specify minor version of redis it self.

References

Any request with a specific version value will be rejected, an exception will be thrown and the process will fail. https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/supported-engine-versions.html#redis-version-6.x

Zogoo commented 3 years ago

Currently I'm solving this issue with following way.

lifecycle {
 ignore_changes = [engine_version]
}

This actually make sense since AWS team wants to manage minor versions for us. And I think no need to Terraform state hold this information anymore. If it would be solved by internal feature on Terraform that will be nice.

DirkRusche commented 3 years ago

Duplicate to #15625?

gurchik commented 3 years ago

Yes this looks like a duplicate of #15625

breathingdust commented 3 years ago

Closing as this appears to be a duplicate of a resolved issue.

github-actions[bot] commented 2 years ago

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.