ElastiCache Without VPC
- Query id: 8c849af7-a399-46f7-a34c-32d3dc96f1fc
- Query name: ElastiCache Without VPC
- Platform: Terraform
- Severity: Low
- Category: Networking and Firewall
- URL: Github
Description¶
ElastiCache should be launched in a Virtual Private Cloud (VPC)
Documentation
Code samples¶
Code samples with security vulnerabilities¶
Postitive test num. 1 - tf file
resource "aws_elasticache_cluster" "positive1" {
cluster_id = "cluster-example"
engine = "memcached"
node_type = "cache.m4.large"
num_cache_nodes = 2
parameter_group_name = aws_elasticache_parameter_group.default.id
port = 11211
}
Code samples without security vulnerabilities¶
Negative test num. 1 - tf file
resource "aws_elasticache_cluster" "negative1" {
cluster_id = "cluster-example"
engine = "memcached"
node_type = "cache.m4.large"
num_cache_nodes = 2
parameter_group_name = aws_elasticache_parameter_group.default.id
port = 11211
subnet_group_name = var.subnet_group_name
}