Create aprdrul stack

https://29022131.atlassian.net/browse/ACT-7101
h1. Request Details
h2. Background
Accommodation team change what we display to our customer by changing values from backend API. Currently, we hardcoded some conditions or use many kind of rules that have their own evaluation behavior and data structure. Most of these rules use forloop evaluation which is not scalable when number of rules are growing bigger . We are going to leverage enterprise's rules engine which is generic & faster for our display rules management and evaluation. We will migrate all our display hardcoded conditions and scattered rules to this new rules engine.

h2. Purpose
Centralized display rules management and evaluation on accommodation product using enterprise's rules engine

h2. Impact


h2. Risk
All display rules on accommodation will be migrated to this new service, and if this new service get out of service, this will make our display rules to not work and all dependent service will be impacted by not getting correct result.

h2. Resources
h3. EC2
h4. Configuration
{code}
count = "4"
instance_type = "c4.large"
ebs_optimized = "false"
disable_api_termination = "false"

root_block_device = {
volume_type = "gp2"
volume_size = "8"
delete_on_termination = "true"
}

tags = {
Service = "aprdrul"
Cluster = "aprdrul-app"
ProductDomain = "apr"
Application = "java-7"
Environment = "production"
Description = "Accommodation Product Display Rule Engine"
}
{code}

h3. ALB
h4. Configuration
{code}
name = "aprdrul-lbint-01"
security_groups = "aprdrul-lbint"
internal = "true"
idle_timeout = "60"
enable_deletion_protection = "false"

tags = {
Name = "aprdrul-lbint-01"
Service = "aprdrul"
ProductDomain = "apr"
Environment = "production"
Description = "aprdrul-app internal load balancer"
}
{code}

h4. Listener
{code}
port = "443"
protocol = "HTTPS"

default_action {
target_group_arn = "aprdrul-app"
type = "forward"
}
{code}

h4. Target Group
{code}
name = "aprdrul-app"
port = "61121"
protocol = "HTTP"
deregistration_delay = "300"

tags = {
Name = "aprdrul-app"
Service = "aprdrul"
ProductDomain = "apr"
Environment = "production"
Description = "Target group for Accommodation Product Display Rule Engine"
}

health_check = {
interval = "30"
path = "/healthcheck"
port = "traffic-port"
protocol = "HTTP"
timeout = "5"
healthy_threshold = "5"
unhealthy_threshold = "2"
matcher = "200"
}
{code}

h4. DNS Record
aprdrul.main.tvlk.cloud

h3. S3 Bucket
h4. Configuration
{code}
bucket = "aprdrul-ruledata-715824975366-579rupctv5s4hpks"
acl = "private"
region = "ap-southeast-1"

tags = {
Service = "aprdrul"
ProductDomain = "apr"
Environment = "production"
Description = "Storage to store accommodation display rules"
}

versioning = {
enabled = true
}
{code}

h3. S3 Bucket Policy

{code}
sid = "AllowReadAprrule"
effect = "Allow"
actions = ["s3:GetObject", "s3:ListBucket"]
identifiers = []
resources = ["arn:aws:s3:::aprdrul-ruledata-715824975366-579rupctv5s4hpks"]

sid = "AllowWriteAprrule"
effect = "Allow"
actions = ["s3:PutObject", "s3:DeleteObject"]
identifiers = []
resources = ["arn:aws:s3:::aprdrul-ruledata-715824975366-579rupctv5s4hpks"]
{code}

h3. Connectivity
SourceId,Destination,from_port,to_port,proto
aprdrul-lbint-01,aprdrul-app,61121,61121,TCP
aprdrul-app,contentapp-lbint-01,443,443,TCP
aprdrul-app,sessiondata-mongod,27017,27017,TCP
aprdrul-app,data-mongod,27017,27017,TCP
acso-app,aprdrul-lbint-01,443,443,TCP