0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

TerraformでElastiCache構築時に「InvalidParameterCombination: PreferredCacheClusterAZs can only be specified for one node group」が出た時の対処

Last updated at Posted at 2022-01-07

状況

AWSのElastiCacheでRedisをクラスターモード且つマルチAZで構築しようとし、Terraformを実行するもタイトルのエラーが出てapplyに失敗しました。

結論

availability_zonesの指定を書いている場合、これをなくします。
(自分の場合は別途定義している変数でnullを渡しても行けました)
これで無事構築ができました。
(AWSコンソールで確認してちゃんとクラスターモード且つマルチAZがenabledになっていました)

resource "aws_elasticache_replication_group" "default" {
  ...
  multi_az_enabled              = true
-  availability_zones            = XX
  ...

  cluster_mode {
    replicas_per_node_group = XX
    num_node_groups         = XX
  }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?