Skip to content

Commit

Permalink
Intial Commit | Adding .yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lolli001 committed Jul 12, 2024
1 parent 73e0f21 commit 4ad6abe
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
14 changes: 14 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,20 @@ module "windows" {
instance_type = "t2.xlarge"
}

# Rhel pipeline testing - Braxton
module "arm_rhel_image_pipeline" {
source = "./packer"
source_repo_name = "aws-image-pipeline"
project_name = "arm-rhel-image-pipeline"
environment = "dev"
source_ami = "ami-0abcdef1234567890" # Specify a base RHEL ARM AMI ID
instance_type = "t4g.micro" # Example ARM instance type
ssh_username = "ec2-user"
playbook = "playbook.yml"
vpc_config = local.vpc_config
state_config = local.state_config
}

output iam_arn {
value = module.main.iam_arn
}
Expand Down
37 changes: 37 additions & 0 deletions packer/rhel-arm.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
packer {
required_plugins {
amazon = {
version = ">= 1.2.8"
source = "github.com/hashicorp/amazon"
}
ansible = {
version = ">= 1.1.1"
source = "github.com/hashicorp/ansible"
}
}
}

variable "subnet_id" {}
variable "security_group_id" {}

source "amazon-ebs" "rhel-arm" {
ami_name = "arm-rhel-image"
instance_type = "t4g.micro"
source_ami = "ami-xxx" # Need to change
ssh_username = "ec2-user"
subnet_id = var.subnet_id
security_group_ids = [
var.security_group_id
]
architecture = "arm64"
}

build {
name = "arm-rhel-build"
sources = [
"source.amazon-ebs.rhel-arm"
]
provisioner "ansible" {
playbook_file = "../ansible/playbook.yml"
}
}

0 comments on commit 4ad6abe

Please sign in to comment.