【问题标题】:Scaling down Redis cache cluster on AWS using Terraform使用 Terraform 在 AWS 上缩减 Redis 缓存集群
【发布时间】:2018-04-05 19:30:48
【问题描述】:

我正在使用 Terraform 来扩大和缩小 AWS 环境以应对短期活动。我遇到了一个问题,AWS 只允许您扩展 Elasticache Redis 实例类型,而不允许您缩减到较小的实例类型。这意味着在我使用 Terraform 缩减规模之前,我必须首先在 AWS 控制台中删除 10 个分片 Redis 节点。有没有更简单的方法来使用 Terraform 先删除然后重新创建较小的实例?

【问题讨论】:

    标签: amazon-web-services redis terraform


    【解决方案1】:

    terraform taint 完成了这项工作

    因此,在您需要更改为较小的实例类型之前,请先污染这些资源。 terraform apply 将首先销毁,然后重新创建这些资源。

    terraform taint aws_elasticache_cluster.my_cluster
    

    参考:

    https://www.terraform.io/docs/commands/taint.html

    【讨论】:

      猜你喜欢
      • 2022-01-16
      • 2018-05-03
      • 2020-12-09
      • 2017-11-02
      • 2017-12-22
      • 2018-11-22
      • 2013-03-21
      • 2020-03-28
      • 1970-01-01
      相关资源
      最近更新 更多