{"repo":"gordonmurray/packer_ansible_inspec_terraform_aws","free":true,"listed":false,"github":"https://github.com/gordonmurray/packer_ansible_inspec_terraform_aws","clone":"git clone https://github.com/gordonmurray/packer_ansible_inspec_terraform_aws.git","description":"A demo application using Packer, Ansible, InSpec and Terraform on AWS","language":"HCL","stars":118,"topics":["packer","ansible","inspec","terraform","aws"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Packer, Ansible, CINC Auditor and Terraform on AWS A small, working demo of Packer, Ansible, CINC Auditor (the open-source InSpec) and Terraform used together on AWS. The end result is a \"Hello World\" PHP page served by nginx on a single EC2 instance in its own VPC. - Packer builds an Amazon Machine Image (AMI). - Ansible runs inside Packer to install nginx and PHP and configure the site. - CINC Auditor runs inside Packer to verify the image looks the way we expect. - Terraform creates a small VPC and launches an EC2 instance from that AMI. Watch it run Building the image with Packer, Ansible and the verification checks: Deploying with Terraform: What you need - An AWS account, with credentials available to your shell (see below). - Packer = 1.7 - Terraform = 1.0 - CINC Auditor — only if you want to run the checks outside Packer. Or skip installing them and use the pinned toolchain image, which has matching versions of everything: AWS credentials Packer and Terraform both use the standard AWS credential chain, so set a profile (or the usual AWS ACCESS KEY ID / AWS SECRET ACCESS KEY ) before you start: Use an identity that can manage EC2 and VPC resources. Prefer a least-privilege IAM role or AWS IAM Identity Center (SSO) over long-lived access keys. Build the AMI This builds from the latest Ubuntu 24.04 LTS, runs the Ansible roles, and verifies the result with CINC Auditor. Deploy with Terraform aws account id is the account that owns the AMI Packer built. The instance's publ","default_branch":null,"files":null,"tree":[],"storefront":"/r/gordonmurray","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gordonmurray/packer_ansible_inspec_terraform_aws/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}