Skip to content

Commit

Permalink
create server 2019 ami for use by ONR
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsweetman committed Mar 18, 2024
1 parent 411fa2a commit 9c29b94
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ updates:
directory: "/teams/hmpps/windows_server_2022"
schedule:
interval: "daily"
- package-ecosystem: "terraform"
directory: "/teams/hmpps/windows_server_2019"
schedule:
interval: "daily"
- package-ecosystem: "terraform"
directory: "/teams/nomis"
schedule:
Expand Down
26 changes: 26 additions & 0 deletions teams/hmpps/windows_server_2019/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
locals {
components_common = [
{
name = "powershell_core"
version = "1.0.0"
parameters = []
},
{
name = "aws_cli"
version = "0.0.4"
parameters = []
},
{
name = "psreadline_fix"
version = "0.0.4"
parameters = []
},
{
name = "git_windows"
version = "0.0.2"
parameters = []
}
]

component_template_args = {}
}
132 changes: 132 additions & 0 deletions teams/hmpps/windows_server_2019/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# following are passed in via pipeline
# BRANCH_NAME =
# GH_ACTOR_NAME =

region = "eu-west-2"
ami_name_prefix = "hmpps"
ami_base_name = "windows_server_2019"
configuration_version = "0.0.1"
release_or_patch = "patch" # or "patch", see nomis AMI image building strategy doc
description = "windows server 2019"

tags = {
os-version = "windows server 2019"
}

parent_image = {
owner = "core-shared-services-production"
arn_resource_id = "mp-windowsserver2019/x.x.x"
}

block_device_mappings_ebs = [
{
device_name = "/dev/sda1" # root volume
volume_size = 30
volume_type = "gp3"
}
]

components_aws = [
"amazon-cloudwatch-agent-windows",
"ec2launch-v2-windows"
]

components_custom = []

infrastructure_configuration = {
instance_types = ["t3.medium"]
}

image_pipeline = {
schedule = {
schedule_expression = "cron(0 0 2 * ? *)"
pipeline_execution_start_condition = "EXPRESSION_MATCH_ONLY"
}
}

accounts_to_distribute_ami_by_branch = {
# push to main branch
main = [
"core-shared-services-production",
"hmpps-domain-services-development",
"hmpps-domain-services-test",
"hmpps-domain-services-preproduction",
"hmpps-domain-services-production",
# "corporate-staff-rostering-test",
# "corporate-staff-rostering-development",
# "corporate-staff-rostering-preproduction",
# "corporate-staff-rostering-production",
# "nomis-development",
# "nomis-test",
# "nomis-preproduction",
# "nomis-production",
# "oasys-development",
# "oasys-test",
# "oasys-preproduction",
# "oasys-production",
# "nomis-data-hub-development",
# "nomis-data-hub-test",
# "nomis-data-hub-preproduction",
# "nomis-data-hub-production"
]

# push to any other branch / local run
default = [
"core-shared-services-production",
"hmpps-domain-services-development",
"hmpps-domain-services-test",
# "corporate-staff-rostering-development",
# "corporate-staff-rostering-test",
# "nomis-development",
# "nomis-test",
# "oasys-development",
# "oasys-test",
# "nomis-data-hub-development",
# "nomis-data-hub-test"
]

}

launch_permission_accounts_by_branch = {
# push to main branch
main = [
"core-shared-services-production",
"hmpps-domain-services-development",
"hmpps-domain-services-test",
# "hmpps-domain-services-preproduction",
# "hmpps-domain-services-production",
# "corporate-staff-rostering-development",
# "corporate-staff-rostering-test",
# "corporate-staff-rostering-preproduction",
# "corporate-staff-rostering-production",
# "nomis-development",
# "nomis-test",
# "nomis-preproduction",
# "nomis-production",
# "oasys-development",
# "oasys-test",
# "oasys-preproduction",
# "oasys-production",
# "nomis-data-hub-development",
# "nomis-data-hub-test",
# "nomis-data-hub-preproduction",
# "nomis-data-hub-production"
]

# push to any other branch / local run
default = [
"core-shared-services-production",
"hmpps-domain-services-development",
"hmpps-domain-services-test",
# "corporate-staff-rostering-development",
# "corporate-staff-rostering-test",
# "nomis-development",
# "nomis-test",
# "oasys-development",
# "oasys-test",
# "nomis-data-hub-development",
# "nomis-data-hub-test"
]
}

launch_template_exists = false
6 changes: 6 additions & 0 deletions teams/hmpps/windows_server_2019/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include {
path = find_in_parent_folders()
}
terraform {
source = "../../..//teams/nomis"
}

0 comments on commit 9c29b94

Please sign in to comment.