Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the documentation for ElastiCache Replication Group address #1542

Merged
merged 1 commit into from
Aug 31, 2017

Conversation

Ninir
Copy link
Contributor

@Ninir Ninir commented Aug 30, 2017

Fixes #375

As exposed in the code, primary_endpoint_address is set when there are node groups, so when in a cluster mode.
configuration_endpoint_address is the exact opposite.

@Ninir Ninir added the documentation Introduces or discusses updates to documentation. label Aug 30, 2017
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks.

@Ninir Ninir merged commit 7f90d33 into hashicorp:master Aug 31, 2017
@Ninir Ninir deleted the d-elasticache-replication-group branch August 31, 2017 13:30
nbaztec pushed a commit to nbaztec/terraform-provider-aws that referenced this pull request Sep 26, 2017
…n-group

Fixed the documentation for ElastiCache Replication Group address
@phunehehe
Copy link

I'm not sure what I'm missing but I'm seeing the opposite: configuration endpoint only exists if cluster mode is enabled, and primary endpoint only exists if cluster mode is disabled...

@radeksimko
Copy link
Member

@phunehehe Do you mind sharing a config which leads you to that conclusion?

I used the following (practically clustered Redis with 2 nodes):

resource "aws_vpc" "network" {
  cidr_block = "10.10.0.0/16"
}

resource "aws_subnet" "main" {
  cidr_block = "10.10.0.0/24"
  availability_zone = "eu-west-2a"
  vpc_id = "${aws_vpc.network.id}"
}

resource "aws_subnet" "secondary" {
  cidr_block = "10.10.5.0/24"
  availability_zone = "eu-west-2b"
  vpc_id = "${aws_vpc.network.id}"
}

resource "aws_elasticache_subnet_group" "main" {
  name = "radek-test"
  subnet_ids = ["${aws_subnet.main.id}", "${aws_subnet.secondary.id}"]
}

resource "aws_elasticache_replication_group" "autoscaling_event_update_route53" {
  replication_group_id          = "asgevnt-route53"
  replication_group_description = "Autoscaling events updating Route53"

  engine_version                = "3.2.4"
  node_type                     = "cache.m4.large"
  number_cache_clusters         = "2"
  port                          = 6379

  subnet_group_name             = "${aws_elasticache_subnet_group.main.name}"
  parameter_group_name          = "default.redis3.2"

  automatic_failover_enabled    = "true"
  availability_zones            = ["eu-west-2a", "eu-west-2b"]
  apply_immediately             = "true"
  maintenance_window            = "sun:01:00-sun:02:00"

  tags {
    Name                        = "autoscaling_event_update_route53"
    environment                 = "core"
    service                     = "main"
  }
}

and it does expose the primary_endpoint_address:

$ echo 'aws_elasticache_replication_group.autoscaling_event_update_route53.primary_endpoint_address' | terraform console
asgevnt-route53.g4wffw.ng.0001.euw2.cache.amazonaws.com

so I believe @Ninir is right.

@phunehehe
Copy link

So I created a setup with various configurations https://gist.github.com/phunehehe/9657cb33d7ba0ab48a113e9c3bc54475 and here's the output:

single	primary_endpoint_address	yes
single	configuration_endpoint_address	no
cluster	primary_endpoint_address	yes
cluster	configuration_endpoint_address	no
native_cluster	primary_endpoint_address	yes
native_cluster	configuration_endpoint_address	no
native_single	primary_endpoint_address	yes
native_single	configuration_endpoint_address	no
sharding	primary_endpoint_address	no
sharding	configuration_endpoint_address	yes

It would seem like configuration_endpoint_address exists when sharding is enabled, and primary_endpoint_address exists otherwise. When sharding is enabled, AWS console displays "Clustered Redis" in the "Mode" column.

@ghost
Copy link

ghost commented Apr 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The documentation for AWS ElastiCache replication group is wrong/incomplete
3 participants