Skip to content

Commit

Permalink
Merge pull request #25087 from hashicorp/elasticache-global-rep-update
Browse files Browse the repository at this point in the history
resource/aws_elasticache_global_replication_group: Adds `lifecycle.ignore_changes` to documentation examples
gdavison authored May 27, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 54d443d + 883d949 commit ff4d9c5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions website/docs/r/elasticache_global_replication_group.html.markdown
Original file line number Diff line number Diff line change
@@ -50,6 +50,9 @@ The initial Redis version is determined by the version set on the primary replic
However, once it is part of a Global Replication Group,
the Global Replication Group manages the version of all member replication groups.

The member replication groups must have [`lifecycle.ignore_changes[engine_version]`](https://www.terraform.io/language/meta-arguments/lifecycle) set,
or Terraform will always return a diff.

In this example,
the primary replication group will be created with Redis 6.0,
and then upgraded to Redis 6.2 once added to the Global Replication Group.
@@ -72,6 +75,10 @@ resource "aws_elasticache_replication_group" "primary" {
node_type = "cache.m5.large"
number_cache_clusters = 1
lifecycle {
ignore_changes = [engine_version]
}
}
resource "aws_elasticache_replication_group" "secondary" {
@@ -82,6 +89,10 @@ resource "aws_elasticache_replication_group" "secondary" {
global_replication_group_id = aws_elasticache_global_replication_group.example.global_replication_group_id
number_cache_clusters = 1
lifecycle {
ignore_changes = [engine_version]
}
}
```

0 comments on commit ff4d9c5

Please sign in to comment.