terraform deploy on ECS (#27)

This commit is contained in:
David Zhao
2021-02-28 22:28:17 -08:00
committed by GitHub
parent 7b93e661f0
commit f7af7607b9
17 changed files with 444 additions and 21 deletions
+18
View File
@@ -0,0 +1,18 @@
resource "aws_elasticache_cluster" "main" {
cluster_id = var.cluster_id
engine = "redis"
node_type = var.instance_type
num_cache_nodes = 1
parameter_group_name = "default.redis6.x"
# strangely terraform requires you to change to a specific version when
# modifying the resource.
engine_version = "6.x"
subnet_group_name = aws_elasticache_subnet_group.main.name
security_group_ids = var.security_groups
port = 6379
}
resource "aws_elasticache_subnet_group" "main" {
name = var.cluster_id
subnet_ids = var.subnet_ids
}