mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 05:01:55 +03:00
attributes to lower case
This commit is contained in:
+35
-35
@@ -3,51 +3,51 @@ data "aws_caller_identity" "current" {
|
||||
|
||||
module "my-ecs" {
|
||||
source = "github.com/in4it/terraform-modules//modules/ecs-cluster"
|
||||
VPC_ID = module.vpc.vpc_id
|
||||
CLUSTER_NAME = "my-ecs"
|
||||
INSTANCE_TYPE = "t2.small"
|
||||
SSH_KEY_NAME = aws_key_pair.mykeypair.key_name
|
||||
VPC_SUBNETS = join(",", module.vpc.public_subnets)
|
||||
ENABLE_SSH = true
|
||||
SSH_SG = aws_security_group.allow-ssh.id
|
||||
LOG_GROUP = "my-log-group"
|
||||
AWS_ACCOUNT_ID = data.aws_caller_identity.current.account_id
|
||||
AWS_REGION = var.AWS_REGION
|
||||
vpc_id = module.vpc.vpc_id
|
||||
cluster_name = "my-ecs"
|
||||
instance_type = "t2.small"
|
||||
ssh_key_name = aws_key_pair.mykeypair.key_name
|
||||
vpc_subnets = join(",", module.vpc.public_subnets)
|
||||
enable_ssh = true
|
||||
ssh_sg = aws_security_group.allow-ssh.id
|
||||
log_group = "my-log-group"
|
||||
aws_account_id = data.aws_caller_identity.current.account_id
|
||||
aws_region = var.AWS_REGION
|
||||
}
|
||||
|
||||
module "my-service" {
|
||||
source = "github.com/in4it/terraform-modules//modules/ecs-service"
|
||||
VPC_ID = module.vpc.vpc_id
|
||||
APPLICATION_NAME = "my-service"
|
||||
APPLICATION_PORT = "80"
|
||||
APPLICATION_VERSION = "latest"
|
||||
CLUSTER_ARN = module.my-ecs.cluster_arn
|
||||
SERVICE_ROLE_ARN = module.my-ecs.service_role_arn
|
||||
AWS_REGION = var.AWS_REGION
|
||||
HEALTHCHECK_MATCHER = "200"
|
||||
CPU_RESERVATION = "256"
|
||||
MEMORY_RESERVATION = "128"
|
||||
LOG_GROUP = "my-log-group"
|
||||
DESIRED_COUNT = 2
|
||||
ALB_ARN = module.my-alb.alb_arn
|
||||
vpc_id = module.vpc.vpc_id
|
||||
application_name = "my-service"
|
||||
application_port = "80"
|
||||
application_version = "latest"
|
||||
cluster_arn = module.my-ecs.cluster_arn
|
||||
service_role_arn = module.my-ecs.service_role_arn
|
||||
aws_region = var.AWS_REGION
|
||||
healthcheck_matcher = "200"
|
||||
cpu_reservation = "256"
|
||||
memory_reservation = "128"
|
||||
log_group = "my-log-group"
|
||||
desired_count = 2
|
||||
alb_arn = module.my-alb.lb_arn
|
||||
}
|
||||
|
||||
module "my-alb" {
|
||||
source = "github.com/in4it/terraform-modules//modules/alb"
|
||||
VPC_ID = module.vpc.vpc_id
|
||||
ALB_NAME = "my-alb"
|
||||
VPC_SUBNETS = join(",", module.vpc.public_subnets)
|
||||
DEFAULT_TARGET_ARN = module.my-service.target_group_arn
|
||||
DOMAIN = "*.ecs.newtech.academy"
|
||||
INTERNAL = false
|
||||
ECS_SG = module.my-ecs.cluster_sg
|
||||
vpc_id = module.vpc.vpc_id
|
||||
lb_name = "my-alb"
|
||||
vpc_subnets = module.vpc.public_subnets
|
||||
default_target_arn = module.my-service.target_group_arn
|
||||
domain = "*.ecs.newtech.academy"
|
||||
internal = false
|
||||
ecs_sg = [module.my-ecs.cluster_sg]
|
||||
}
|
||||
|
||||
module "my-alb-rule" {
|
||||
source = "github.com/in4it/terraform-modules//modules/alb-rule"
|
||||
LISTENER_ARN = module.my-alb.http_listener_arn
|
||||
PRIORITY = 100
|
||||
TARGET_GROUP_ARN = module.my-service.target_group_arn
|
||||
CONDITION_FIELD = "host-header"
|
||||
CONDITION_VALUES = ["subdomain.ecs.newtech.academy"]
|
||||
listener_arn = module.my-alb.http_listener_arn
|
||||
priority = 100
|
||||
target_group_arn = module.my-service.target_group_arn
|
||||
condition_field = "host-header"
|
||||
condition_values = ["subdomain.ecs.newtech.academy"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user