Skip to content

Commit

Permalink
Add ENDPOINT suffix to redis parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStainsby committed Apr 10, 2024
1 parent e0f075c commit e677b55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion elasticache-redis/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ resource "aws_security_group" "redis" {
}

resource "aws_ssm_parameter" "endpoint" {
name = "/copilot/${var.application}/${var.environment}/secrets/${upper(replace("${var.name}", "-", "_"))}"
name = "/copilot/${var.application}/${var.environment}/secrets/${upper(replace("${var.name}_ENDPOINT", "-", "_"))}"
description = "Redis endpoint"
type = "SecureString"
value = "rediss://${aws_elasticache_replication_group.redis.primary_endpoint_address}:6379"
Expand Down
2 changes: 1 addition & 1 deletion elasticache-redis/tests/elasticache-redis.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ run "aws_ssm_parameter_unit_test" {

### Test aws_ssm_parameter resource ###
assert {
condition = aws_ssm_parameter.endpoint.name == "/copilot/redis-test-application/redis-test-environment/secrets/REDIS_TEST_NAME"
condition = aws_ssm_parameter.endpoint.name == "/copilot/redis-test-application/redis-test-environment/secrets/REDIS_TEST_NAME_ENDPOINT"
error_message = "Invalid config for aws_ssm_parameter name"
}

Expand Down

0 comments on commit e677b55

Please sign in to comment.