hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.14k stars 9.47k forks source link

Error: string is required after upgrade in redis cache resource #35506

Open charlesanil opened 1 month ago

charlesanil commented 1 month ago

Terraform Version

Old version 0.13.2 
Upgrade Terraform version: 1.9.3

AWS Provider Old 4.67.0 
AWS Provider New 5.59.0

Terraform Configuration Files

terraform { required_version = "1.9.3" required_providers { aws = { source = "hashicorp/aws" version = "~> 5.60.0" } archive = { source = "hashicorp/archive" version = "~> 2.4.0" } local = { source = "hashicorp/local" version = "~> 2.4.0" } } }

Debug Output

Error: string is required

│ with module.redis_cache.aws_elasticache_replication_group.this,

│ on ....\modules\elasti-cache\redis-cache\main.tf line 8, in resource "aws_elasticache_replication_group" "this":

│ 8: resource "aws_elasticache_replication_group" "this" {

Expected Behavior

The code was working fine with terraform plan and apply in older version. It throws the error after upgrade. There was no other infra changes and only version upgrade task.

Actual Behavior

Throws erros in redis cache resource during plan as pasted in debug output window

Steps to Reproduce

it comes during terraform plan after upgrade

Additional Context

No. tried eevn the latest provided aws provider and terrfaorm

References

No response

liamcervante commented 1 month ago

Hi @charlesanil, the error suggests that the type of a particular attribute in the resource has changed between the aws versions you upgraded from and to.

Are you able to share more of the configuration around the area of code highlighted by the error message?