Skip to content

Commit

Permalink
add asgs to temp and change default tags
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsweetman committed Apr 3, 2024
1 parent 5f2e7f7 commit 15fba2a
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ locals {
vpc_security_group_ids = ["web"]
})
tags = {
os-type = "Linux"
component = "onr_web"
ami = "base_rhel_7_9"
os-type = "Linux"
component = "web"
server-type = "onr-web"
}
# FIXME: ebs_volumes list is NOT YET CORRECT and will need to change
ebs_volumes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ locals {
# })
# })
# })
# }
# dev-bods-a = merge(local.defaults_bods_ec2,
# {
# config = merge(local.defaults_bods_ec2.config, {
Expand Down Expand Up @@ -74,6 +73,18 @@ locals {
})
autoscaling_schedules = module.baseline_presets.ec2_autoscaling_schedules.working_hours
})
dev-bods-asg = merge(local.defaults_bods_ec2, {
config = merge(local.defaults_bods_ec2.config,{
availability_zone = "${local.region}a"
})
instance = merge(local.defaults_bods_ec2.instance, {
instance_type = "t3.large"
})
autoscaling_group = merge(module.baseline_presets.ec2_autoscaling_group.default, {
desired_capacity = 0
})
autoscaling_schedules = module.baseline_presets.ec2_autoscaling_schedules.working_hours
})
}
}
}
Expand Down
48 changes: 48 additions & 0 deletions terraform/environments/oasys-national-reporting/locals_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,53 @@ locals {

# baseline config
test_config = {
baseline_ec2_autoscaling_groups = {
test-web-asg = merge(local.defaults_web_ec2.config, {
config = merge(local.defaults_web_ec2.config, {
availability_zone = "${local.region}a"
})
instance = merge(local.defaults_web_ec2.instance, {
instance_type = "t3.large"
})
user_data_cloud_init = merge(module.baseline_presets.ec2_instance.user_data_cloud_init.ssm_agent_and_ansible, {
args = merge(module.baseline_presets.ec2_instance.user_data_cloud_init.ssm_agent_and_ansible.args, {
branch = "main"
})
})
autoscaling_group = merge(module.baseline_presets.ec2_autoscaling_group.default, {
desired_capacity = 0
})
autoscaling_schedules = module.baseline_presets.ec2_autoscaling_schedules.working_hours
})
test-boe-asg = merge(local.defaults_boe_ec2, {
config = merge(local.defaults_boe_ec2.config, {
availability_zone = "${local.region}a"
})
instance = merge(local.defaults_boe_ec2.instance, {
instance_type = "t2.large"
})
user_data_cloud_init = merge(module.baseline_presets.ec2_instance.user_data_cloud_init.ssm_agent_and_ansible, {
args = merge(module.baseline_presets.ec2_instance.user_data_cloud_init.ssm_agent_and_ansible.args, {
branch = "main"
})
})
autoscaling_group = merge(module.baseline_presets.ec2_autoscaling_group.default, {
desired_capacity = 0
})
autoscaling_schedules = module.baseline_presets.ec2_autoscaling_schedules.working_hours
})
test-bods-asg = merge(local.defaults_bods_ec2, {
config = merge(local.defaults_bods_ec2.config,{
availability_zone = "${local.region}a"
})
instance = merge(local.defaults_bods_ec2.instance, {
instance_type = "t3.large"
})
autoscaling_group = merge(module.baseline_presets.ec2_autoscaling_group.default, {
desired_capacity = 0
})
autoscaling_schedules = module.baseline_presets.ec2_autoscaling_schedules.working_hours
})
}
}
}

0 comments on commit 15fba2a

Please sign in to comment.