terraform-provider-awscc
terraform-provider-awscc copied to clipboard
awscc_elasticache_serverless_cache - force replacement due to attribute "engine" not case sensitive
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
- The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.
Terraform CLI and Terraform AWS Cloud Control Provider Version
Affected Resource(s)
- awscc_elasticache_serverless_cache
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
resource "awscc_elasticache_serverless_cache" "ec-svrls" {
engine = "Redis"
serverless_cache_name = "test"
}
Debug Output
Terraform plan debug log Terraform state file
Expected Behavior
Terraform apply followed by Terraform plan should not trigger any force replacement
Actual Behavior
The subsequent Terraform plan (without any changes on the HCL) will trigger replacement
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
Terraform will perform the following actions:
# awscc_elasticache_serverless_cache.ec-svrls must be replaced
-/+ resource "awscc_elasticache_serverless_cache" "ec-svrls" {
~ arn = "arn:aws:elasticache:us-east-1:204034886740:serverlesscache:test" -> (known after apply)
+ cache_usage_limits = (known after apply)
~ create_time = "2024-02-27T00:42:35.725Z" -> (known after apply)
~ daily_snapshot_time = "08:30" -> (known after apply)
~ description = " " -> (known after apply)
~ endpoint = {
~ address = "test-mqowku.serverless.use1.cache.amazonaws.com" -> (known after apply)
~ port = "6379" -> (known after apply)
} -> (known after apply)
~ engine = "redis" -> "Redis" # forces replacement
+ final_snapshot_name = (known after apply)
~ full_engine_version = "7.1" -> (known after apply)
~ id = "test" -> (known after apply)
+ kms_key_id = (known after apply) # forces replacement
~ major_engine_version = "7" -> (known after apply)
~ reader_endpoint = {
~ address = "test-mqowku.serverless.use1.cache.amazonaws.com" -> (known after apply)
~ port = "6380" -> (known after apply)
} -> (known after apply)
~ security_group_ids = [
- "sg-feb876b3",
] -> (known after apply)
+ snapshot_arns_to_restore = (known after apply) # forces replacement
~ snapshot_retention_limit = 0 -> (known after apply)
~ status = "available" -> (known after apply)
~ subnet_ids = [
- "subnet-0765e15b",
- "subnet-08a0eb42",
- "subnet-34fb863b",
] -> (known after apply)
+ tags = (known after apply)
+ user_group_id = (known after apply)
# (1 unchanged attribute hidden)
}
Plan: 1 to add, 0 to change, 1 to destroy.
Steps to Reproduce
-
terraform apply
-
terraform plan
Important Factoids
References
- #1198
Attribute engine
is just a string in the schema without enum:
aws cloudformation describe-type --type RESOURCE --type-name AWS::ElastiCache::ServerlessCache | jq -r ".Schema" | jq "."
"properties": {
"ServerlessCacheName": {
"description": "The name of the Serverless Cache. This value must be unique.",
"type": "string"
},
"Description": {
"description": "The description of the Serverless Cache.",
"type": "string"
},
"Engine": {
"description": "The engine name of the Serverless Cache.",
"type": "string"
},
Ideally this should be an enumeration