-
Notifications
You must be signed in to change notification settings - Fork 1
/
windows-template-cis-aws.json
80 lines (80 loc) · 3.09 KB
/
windows-template-cis-aws.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
"variables": {
"region": "eu-central-1",
"kms_key_id": "{{env `KEY`}}",
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"aws_session_token": "{{env `AWS_SESSION_TOKEN`}}",
"subnet_id": "{{env `SUBNET`}}",
"vpc_id": "{{env `VPC`}}"
},
"builders": [
{
"type": "amazon-ebs",
"user_data_file": "powershell/ec2-data.ps1",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"token": "{{user `aws_session_token`}}",
"region": "eu-central-1",
"vpc_id": "{{user `vpc_id`}}",
"subnet_id": "{{user `subnet_id`}}",
"encrypt_boot": "true",
"kms_key_id": "{{user `kms_key_id`}}",
"instance_type": "t2.large",
"communicator": "winrm",
"winrm_username": "Administrator",
"winrm_password": "###############",
"winrm_use_ssl": true,
"winrm_insecure": true,
"ami_description": "CIS Microsoft Windows Server 2016 Benchmark Baseline AMI for Testing Servicesinstances",
"ami_name": "Win2016-QAWin-{{isotime \"2006-01-02\"}}",
"ami_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 40,
"volume_type": "gp2",
"delete_on_termination": true
}
],
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 40,
"volume_type": "gp2",
"delete_on_termination": true
}
],
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"root-device-type": "ebs",
"name": "CIS Microsoft Windows Server 2016 Benchmark*"
},
"most_recent": true,
"owners": "679593333241"
},
"run_tags": {
"Name": "Packer-Builder-Windows",
"OS_Version": "CIS Microsoft Windows Server 2016 Benchmark Base",
"Release": "Latest",
"Runner": "Windows"
},
"tags": {
"Name": "Win2016-QAWin-baseline",
"ami_version": "{{isotime \"2006-01-02\"}}",
"ami_os": "CIS Microsoft Windows Server 2016 Benchmark",
"ami_cis_benchmark_version": "1.0.0"
}
}
],
"provisioners": [
{
"type": "powershell",
"inline": [
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SendWindowsIsReady.ps1 -Schedule",
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\InitializeInstance.ps1 -Schedule",
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SysprepInstance.ps1 -NoShutdown"
]
}
]
}