Skip to content

Commit

Permalink
Added pkr file and updated main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
lolli001 committed Jul 17, 2024
1 parent e02fc50 commit f12253b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ module "rhel-arm" {
instance_type = "t4g.micro"
}


resource random_password winrm {
length = 24
override_special = "$*!"
Expand Down
25 changes: 25 additions & 0 deletions modules/image-pipeline/build.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
variable "project_name" {
type = string
default = "rhel-arm-image-pipeline-demo"
}

variable "ansible_dir" {
type = string
default = ""
}

source "amazon-ebs" "rhel-arm" {
ami_name = "${var.project_name}-{{timestamp}}"
instance_type = "t4g.micro"
region = "us-gov-west-1"
source_ami = "ami-0ce8fc041db68907c"
ssh_username = "ec2-user"
}

build {
sources = ["source.amazon-ebs.rhel-arm"]

provisioner "ansible" {
playbook_file = "${var.ansible_dir}/rhel-arm-baseline.yaml"
}
}

0 comments on commit f12253b

Please sign in to comment.