通过terraform更改redis集群的auth\u令牌导致它被破坏并重新创建如何避免?

fsi0uk1n  于 2021-06-09  发布在  Redis
关注(0)|答案(0)|浏览(251)

我想改变现状 auth_token 一个redis集群。但当我更改它时,terrafrom计划告诉我它想重新创建集群:

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

      # module.live_presentation_elasticache.aws_elasticache_replication_group.main[0] must be replaced
    -/+ resource "aws_elasticache_replication_group" "main" {
          + apply_immediately              = (known after apply)
            at_rest_encryption_enabled     = true
          ~ auth_token                     = (sensitive value)
            auto_minor_version_upgrade     = false
            automatic_failover_enabled     = true
          ~ configuration_endpoint_address = "clustercfg.my-project.abcde5.use1.cache.amazonaws.com" -> (known after apply)
            engine                         = "redis"
            engine_version                 = "5.0.3"
          ~ id                             = "my-project" -> (known after apply)
            maintenance_window             = "sun:07:00-sun:08:00"
          ~ member_clusters                = [
              - "my-project-0001-001",
              - "my-project-0002-001",
              - "my-project-0003-001",
            ] -> (known after apply)
            node_type                      = "cache.t2.micro"
          ~ number_cache_clusters          = 3 -> (known after apply)
            parameter_group_name           = "default.redis5.0.cluster.on"
            port                           = 6379
          + primary_endpoint_address       = (known after apply)
            replication_group_id           = "my-project"
            security_group_ids             = [
                "sg-0600b285b055c64b1",
            ]
          ~ security_group_names           = [] -> (known after apply)
            snapshot_retention_limit       = 30
            snapshot_window                = "06:00-07:00"
            subnet_group_name              = "my-project-redis-subnet"
            tags                           = {
                "Flavor" = "dev"
                "Name"   = "live-presentation"
            }
            transit_encryption_enabled     = true

            cluster_mode {
                num_node_groups         = 3
                replicas_per_node_group = 0
            }
        }

    Plan: 1 to add, 0 to change, 1 to destroy.

我想避免重新创建redis集群。其中一些明显的原因是:我希望避免丢失数据和停机。
有没有一种破坏性较小的方法来更新auth\u令牌?优选地形溶液,但不是必需的。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题