Created
October 24, 2019 21:25
-
-
Save youngfeldt/c2f5c6edbd618d7e3b60f52feab37419 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{ | |
"description": "Create nomis version of cis hardened amazon linux.", | |
"min_packer_version": "1.4.4", | |
"variables": { | |
"ansible_dir" : "/home/ec2-user/ansible/", | |
"ansible_source_location" : "s3://xxx-shared-services-devops-share/ansible-modules/", | |
"aws_subnet" : null, | |
"aws_vpc" : null, | |
"base_ami_name" : null, | |
"build_ver" : null, | |
"encryption_key" : "aa6624eb-d789-4380-8911", | |
"instance_profile" : "gen3_generic", | |
"region" : null, | |
"ssh_username" : "ec2-user" | |
}, | |
"builders": [ | |
{ | |
"ami_description": "Amazon Linux2 x86_64 HVM EBS (encrypted) and CIS hardened.", | |
"ami_name": "{{user `base_ami_name`}}-{{user `build_ver`}}-{{timestamp}}", | |
"ami_regions": [ | |
"us-west-2", | |
"ap-southeast-2" | |
], | |
"ami_virtualization_type": "hvm", | |
"associate_public_ip_address": true, | |
"communicator": "ssh", | |
"iam_instance_profile": "{{user `instance_profile`}}", | |
"launch_block_device_mappings": [{ | |
"device_name": "/dev/xvda", | |
"delete_on_termination": true, | |
"encrypted": true, | |
"kms_key_id": "aa6624eb-d789-4380-8911", | |
"volume_size": 50, | |
"volume_type": "gp2" | |
}], | |
"region": "{{user `region`}}", | |
"region_kms_key_ids": { | |
"us-west-2": "aa6624eb-d789-4380-8911", | |
"ap-southeast-2": "1a2d6900-52cc-4eb7" | |
}, | |
"snapshot_users": ["99999999999"], | |
"source_ami_filter": { | |
"filters": { | |
"virtualization-type": "hvm", | |
"architecture": "x86_64", | |
"name": "*amzn2-ami-hvm-*", | |
"block-device-mapping.volume-type": "gp2", | |
"root-device-type": "ebs" | |
}, | |
"owners": [ | |
"amazon" | |
], | |
"most_recent": true | |
}, | |
"ssh_pty": true, | |
"ssh_timeout": "10m", | |
"ssh_username": "{{user `ssh_username`}}", | |
"subnet_id": "{{user `aws_subnet`}}", | |
"tags": { | |
"Name": "{{user `base_ami_name`}}-{{user `build_ver`}}", | |
"OS": "AMAZONLINUX", | |
"OSVER": "2" | |
}, | |
"type": "amazon-ebs", | |
"vpc_id": "{{user `aws_vpc`}}" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment