generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create server 2019 ami for use by ONR
- Loading branch information
1 parent
411fa2a
commit 9c29b94
Showing
4 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include { | ||
path = find_in_parent_folders() | ||
} | ||
terraform { | ||
source = "../../..//teams/nomis" | ||
} |