-1

I need a help to Design a network that meets the following requirements: Core network resources are duplicated in at least 2 regions Network traffic is routed to the appropriate region, based on user location Subnetworks are appropriately sized and secured All devices exist such that networks can be connected to the internet and each other Networks are tolerant of internet events, and are designed to be highly available I will need to include in the design any device that will process information in this architecture, even if you do not have implicit control of it (routes, firewalls, NAT Gateways, Internet Gateways, etc.).

Need help in Automate the creation and deconstruction of this service. I need to use any tool like terraform/cloudformation or ansible / chef cookbooks to deploy, as long as it is expressed in code and/or configuration. Assume the following: The vpc and subnet already exists Only local network access is required for all resources and need this architecture need to scale up and down using autoscaling launch configuration when it meets the threshold based on load and alert sent through cloudwatch/sns.

1 Answers1

0

Does this yaml automation code help this is what I am going to try..Please let me know your input

Usage
resource "aws_sns_topic" "global" {
  ...
}

resource "aws_elasticache_subnet_group" "redis" {
  ...
}

resource "aws_elasticache_parameter_group" "redis" {
  ...
}

module "cache" {
  source = "github.com/nazeerahamed79/terraform-aws-redis-elasticache"

  vpc_id                     = "vpc-20f74844"
  cache_identifier           = "cache"
  automatic_failover_enabled = "false"
  desired_clusters           = "1"
  instance_type              = "cache.t2.micro"
  engine_version             = "3.2.4"
  parameter_group            = "${aws_elasticache_parameter_group.redis.name}"
  subnet_group               = "${aws_elasticache_subnet_group.redis.name}"
  maintenance_window         = "sun:02:30-sun:03:30"
  notification_topic_arn     = "${aws_sns_topic.global.arn}"

  alarm_cpu_threshold    = "75"
  alarm_memory_threshold = "10000000"
  alarm_actions          = ["${aws_sns_topic.global.arn}"]

  project     = "Redis_deployment"
  environment = "Redis_deployment"
}
Variables
vpc_id - ID of VPC meant to house the cache
project - Name of the project making use of the cluster (default: Redis_deployment)
environment - Name of environment the cluster is targeted for (Redis_Multi_azdeployment: Unknown)
cache_identifier - Name used as ElastiCache cluster ID
automatic_failover_enabled - Flag to determine if automatic failover should be enabled
desired_clusters - Number of cache clusters in replication group
instance_type - Instance type for cache instance (default: cache.t2.micro)
engine_version - Cache engine version (default: 3.2.4)
parameter_group - Cache parameter group name (default: redis3.2)
subnet_group - Cache subnet group name
maintenance_window - Time window to reserve for maintenance
notification_topic_arn - ARN to notify when cache events occur
alarm_cpu_threshold - CPU alarm threshold as a percentage (default: 75)
alarm_memory_threshold - Free memory alarm threshold in bytes (default: 10000000)
alarm_actions - ARN to be notified via CloudWatch when alarm thresholds are triggered
Outputs
id - The replication group ID
cache_security_group_id - Security group ID of the cache cluster
port - Port of replication group leader
endpoint - Public DNS name of replication group leader