File tree Expand file tree Collapse file tree 6 files changed +53
-1
lines changed Expand file tree Collapse file tree 6 files changed +53
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ variable "instance_type" {
4242 default = " m3.medium"
4343}
4444
45+ variable "iam_instance_profile" {
46+ description = " IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
47+ type = string
48+ default = " "
49+ }
50+
4551variable "root_volume_size_gb" {
4652 type = number
4753 default = 8
@@ -98,6 +104,7 @@ locals {
98104source "amazon-ebs" "githubrunner" {
99105 ami_name = " github-runner-al2023-x86_64-${ formatdate (" YYYYMMDDhhmm" , timestamp ())} "
100106 instance_type = var. instance_type
107+ iam_instance_profile = var. iam_instance_profile
101108 region = var. region
102109 security_group_id = var. security_group_id
103110 subnet_id = var. subnet_id
Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ variable "instance_type" {
4242 default = " t3.medium"
4343}
4444
45+ variable "iam_instance_profile" {
46+ description = " IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
47+ type = string
48+ default = " "
49+ }
50+
4551variable "root_volume_size_gb" {
4652 type = number
4753 default = 8
@@ -98,6 +104,7 @@ locals {
98104source "amazon-ebs" "githubrunner" {
99105 ami_name = " github-runner-ubuntu-focal-amd64-${ formatdate (" YYYYMMDDhhmm" , timestamp ())} "
100106 instance_type = var. instance_type
107+ iam_instance_profile = var. iam_instance_profile
101108 region = var. region
102109 security_group_id = var. security_group_id
103110 subnet_id = var. subnet_id
@@ -200,6 +207,7 @@ build {
200207 " sudo chmod +x /var/lib/cloud/scripts/per-boot/start-runner.sh" ,
201208 ]
202209 }
210+
203211 post-processor "manifest" {
204212 output = " manifest.json"
205213 strip_path = true
Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ variable "instance_type" {
4242 default = " t4g.small"
4343}
4444
45+ variable "iam_instance_profile" {
46+ description = " IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
47+ type = string
48+ default = " "
49+ }
50+
4551variable "root_volume_size_gb" {
4652 type = number
4753 default = 8
@@ -98,6 +104,7 @@ locals {
98104source "amazon-ebs" "githubrunner" {
99105 ami_name = " github-runner-ubuntu-jammy-arm64-${ formatdate (" YYYYMMDDhhmm" , timestamp ())} "
100106 instance_type = var. instance_type
107+ iam_instance_profile = var. iam_instance_profile
101108 region = var. region
102109 security_group_id = var. security_group_id
103110 subnet_id = var. subnet_id
@@ -200,6 +207,7 @@ build {
200207 " sudo chmod +x /var/lib/cloud/scripts/per-boot/start-runner.sh" ,
201208 ]
202209 }
210+
203211 post-processor "manifest" {
204212 output = " manifest.json"
205213 strip_path = true
Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ variable "instance_type" {
4242 default = " t3.medium"
4343}
4444
45+ variable "iam_instance_profile" {
46+ description = " IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
47+ type = string
48+ default = " "
49+ }
50+
4551variable "root_volume_size_gb" {
4652 type = number
4753 default = 8
@@ -98,6 +104,7 @@ locals {
98104source "amazon-ebs" "githubrunner" {
99105 ami_name = " github-runner-ubuntu-jammy-amd64-${ formatdate (" YYYYMMDDhhmm" , timestamp ())} "
100106 instance_type = var. instance_type
107+ iam_instance_profile = var. iam_instance_profile
101108 region = var. region
102109 security_group_id = var. security_group_id
103110 subnet_id = var. subnet_id
@@ -200,6 +207,7 @@ build {
200207 " sudo chmod +x /var/lib/cloud/scripts/per-boot/start-runner.sh" ,
201208 ]
202209 }
210+
203211 post-processor "manifest" {
204212 output = " manifest.json"
205213 strip_path = true
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ variable "instance_type" {
2424 default = " t3a.medium"
2525}
2626
27+ variable "iam_instance_profile" {
28+ description = " IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
29+ type = string
30+ default = " "
31+ }
32+
2733variable "ebs_delete_on_termination" {
2834 description = " Indicates whether the EBS volume is deleted on instance termination."
2935 type = bool
@@ -64,6 +70,7 @@ source "amazon-ebs" "githubrunner" {
6470 ami_name = " github-runner-windows-core-2019-${ formatdate (" YYYYMMDDhhmm" , timestamp ())} "
6571 communicator = " winrm"
6672 instance_type = var. instance_type
73+ iam_instance_profile = var. iam_instance_profile
6774 region = var. region
6875 associate_public_ip_address = var. associate_public_ip_address
6976 temporary_security_group_source_public_ip = var. temporary_security_group_source_public_ip
@@ -114,6 +121,7 @@ build {
114121 })
115122 ], var. custom_shell_commands )
116123 }
124+
117125 post-processor "manifest" {
118126 output = " manifest.json"
119127 strip_path = true
Original file line number Diff line number Diff line change @@ -18,6 +18,18 @@ variable "region" {
1818 default = " eu-west-1"
1919}
2020
21+ variable "instance_type" {
22+ description = " The instance type Packer will use for the builder"
23+ type = string
24+ default = " m4.xlarge"
25+ }
26+
27+ variable "iam_instance_profile" {
28+ description = " IAM instance profile Packer will use for the builder. An empty string (default) means no profile will be assigned."
29+ type = string
30+ default = " "
31+ }
32+
2133variable "security_group_id" {
2234 description = " The ID of the security group Packer will associate with the builder to enable access"
2335 type = string
@@ -74,7 +86,8 @@ locals {
7486source "amazon-ebs" "githubrunner" {
7587 ami_name = " github-runner-windows-core-2022-${ formatdate (" YYYYMMDDhhmm" , timestamp ())} "
7688 communicator = " winrm"
77- instance_type = " m4.xlarge"
89+ instance_type = var. instance_type
90+ iam_instance_profile = var. iam_instance_profile
7891 region = var. region
7992 security_group_id = var. security_group_id
8093 subnet_id = var. subnet_id
You can’t perform that action at this time.
0 commit comments