-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add stack-level redis module * testing * testing * refactor redis to use stack-level redis cache * move kubernetes_secret service_redis to route53 * lint * add tags * documentation
- Loading branch information
Showing
33 changed files
with
533 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 0 additions & 71 deletions
71
{{cookiecutter.github_repo_name}}/terraform/environments/modules/redis/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +0,0 @@ | ||
#------------------------------------------------------------------------------ | ||
# written by: Miguel Afonso | ||
# https://www.linkedin.com/in/mmafonso/ | ||
# | ||
# date: Aug-2021 | ||
# | ||
# usage: create an ElastiCache Redis cache | ||
# | ||
# FIX NOTE: get rid of module dependency | ||
#------------------------------------------------------------------------------ | ||
locals { | ||
name = var.replication_group_description | ||
} | ||
|
||
|
||
################################################################################ | ||
# Supporting Resources | ||
################################################################################ | ||
|
||
module "security_group" { | ||
source = "terraform-aws-modules/security-group/aws" | ||
version = "{{ cookiecutter.terraform_aws_modules_sg }}" | ||
|
||
name = local.name | ||
description = "openedx_devops: Allow access to MySQL" | ||
vpc_id = var.vpc_id | ||
|
||
# ingress | ||
ingress_with_cidr_blocks = [ | ||
{ | ||
description = "openedx_devops: Redis access from within VPC" | ||
from_port = var.port | ||
to_port = var.port | ||
protocol = "tcp" | ||
cidr_blocks = join(",", var.ingress_cidr_blocks) | ||
}, | ||
] | ||
|
||
egress_with_cidr_blocks = [ | ||
{ | ||
description = "openedx_devops: Node all egress" | ||
protocol = "-1" | ||
from_port = 0 | ||
to_port = 0 | ||
type = "egress" | ||
cidr_blocks = "0.0.0.0/0" | ||
ipv6_cidr_blocks = "::/0" | ||
}, | ||
] | ||
|
||
tags = var.tags | ||
|
||
} | ||
|
||
|
||
module "redis" { | ||
source = "./modules/elasticache" | ||
|
||
description = local.name | ||
create_random_auth_token = var.create_random_auth_token | ||
subnet_ids = var.subnet_ids | ||
engine = var.engine | ||
engine_version = var.engine_version | ||
num_cache_clusters = var.num_cache_clusters | ||
port = var.port | ||
vpc_security_group_ids = [module.security_group.security_group_id] | ||
transit_encryption_enabled = var.transit_encryption_enabled | ||
family = var.family | ||
node_type = var.node_type | ||
tags = var.tags | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.