Open lanandra opened 1 week ago
example of the recreation of redis cluster:
21:02:30 # google_redis_cluster.redis_cluster must be replaced
21:02:30 -/+ resource "google_redis_cluster" "redis_cluster" {
21:02:30 ~ create_time = "2024-07-01T13:44:29.096602051Z" -> (known after apply)
21:02:30 ~ discovery_endpoints = [
21:02:30 - {
21:02:30 - address = "10.158.192.14"
21:02:30 - port = 6379
21:02:30 - psc_config = [
21:02:30 - {
21:02:30 - network = "projects/project-id/global/networks/network-id"
21:02:30 },
21:02:30 ]
21:02:30 },
21:02:30 ] -> (known after apply)
21:02:30 ~ id = "projects/project-id/locations/us-central1/clusters/memorystore-name" -> (known after apply)
21:02:30 name = "memorystore-name"
21:02:30 ~ precise_size_gb = 19.5 -> (known after apply)
21:02:30 ~ psc_connections = [
21:02:30 - {
21:02:30 - address = "10.158.192.14"
21:02:30 - forwarding_rule = "https://www.googleapis.com/compute/v1/projects/project-id/regions/us-central1/forwardingRules/rule-id"
21:02:30 - network = "projects/project-id/global/networks/network-id"
21:02:30 - project_id = "project-id"
21:02:30 - psc_connection_id = "connection-id"
21:02:30 },
21:02:30 - {
21:02:30 - address = "10.158.192.4"
21:02:30 - forwarding_rule = "https://www.googleapis.com/compute/v1/projects/project-id/regions/us-central1/forwardingRules/rule-id"
21:02:30 - network = "projects/project-id/global/networks/network-id"
21:02:30 - project_id = "project-id"
21:02:30 - psc_connection_id = "connection-id"
21:02:30 },
21:02:30 ] -> (known after apply)
21:02:30 - replica_count = 0 -> null
21:02:30 ~ size_gb = 20 -> (known after apply)
21:02:30 ~ state = "ACTIVE" -> (known after apply)
21:02:30 ~ state_info = [] -> (known after apply)
21:02:30 ~ uid = "uid" -> (known after apply)
21:02:30 # (7 unchanged attributes hidden)
21:02:30
21:02:30 - zone_distribution_config { # forces replacement
21:02:30 - mode = "MULTI_ZONE" -> null
21:02:30 }
21:02:30
21:02:30 # (1 unchanged block hidden)
21:02:30 }
21:02:30
21:02:30 Plan: 1 to add, 0 to change, 1 to destroy.
Found out zone_distribution_config
that force the replacement
TL;DR
Recreation of redis cluster although no updated configurations on module block
Expected behavior
When there is no updated configurations, terraform plan and terraform apply should find no drift and no need to recreate the cluster
Observed behavior
I am using module/submodule
terraform-google-modules/memorystore/google//modules/redis-cluster
version9.0
The behavior what i observed are:
module.redis_cluster.google_redis_cluster.redis_cluster must be replaced
Terraform Configuration
Terraform Version
Additional information
No response