Skip to content

feat: Make Packer builder IAM role configurable #4342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions images/linux-al2023/github_agent.linux.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ variable "instance_type" {
default = "m3.medium"
}

variable "iam_instance_profile" {
description = "The IAM instance profile to run the builder as"
type = string
default = ""
}

variable "root_volume_size_gb" {
type = number
default = 8
Expand Down Expand Up @@ -103,6 +109,7 @@ source "amazon-ebs" "githubrunner" {
subnet_id = var.subnet_id
associate_public_ip_address = var.associate_public_ip_address
temporary_security_group_source_public_ip = var.temporary_security_group_source_public_ip
iam_instance_profile = var.iam_instance_profile

source_ami_filter {
filters = {
Expand Down
7 changes: 7 additions & 0 deletions images/ubuntu-focal/github_agent.ubuntu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ variable "instance_type" {
default = "t3.medium"
}

variable "iam_instance_profile" {
description = "The IAM instance profile to run the builder as"
type = string
default = ""
}

variable "root_volume_size_gb" {
type = number
default = 8
Expand Down Expand Up @@ -103,6 +109,7 @@ source "amazon-ebs" "githubrunner" {
subnet_id = var.subnet_id
associate_public_ip_address = var.associate_public_ip_address
temporary_security_group_source_public_ip = var.temporary_security_group_source_public_ip
iam_instance_profile = var.iam_instance_profile

source_ami_filter {
filters = {
Expand Down
7 changes: 7 additions & 0 deletions images/ubuntu-jammy-arm64/github_agent.ubuntu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ variable "instance_type" {
default = "t4g.small"
}

variable "iam_instance_profile" {
description = "The IAM instance profile to run the builder as"
type = string
default = ""
}

variable "root_volume_size_gb" {
type = number
default = 8
Expand Down Expand Up @@ -103,6 +109,7 @@ source "amazon-ebs" "githubrunner" {
subnet_id = var.subnet_id
associate_public_ip_address = var.associate_public_ip_address
temporary_security_group_source_public_ip = var.temporary_security_group_source_public_ip
iam_instance_profile = var.iam_instance_profile

source_ami_filter {
filters = {
Expand Down
7 changes: 7 additions & 0 deletions images/ubuntu-jammy/github_agent.ubuntu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ variable "instance_type" {
default = "t3.medium"
}

variable "iam_instance_profile" {
description = "The IAM instance profile to run the builder as"
type = string
default = ""
}

variable "root_volume_size_gb" {
type = number
default = 8
Expand Down Expand Up @@ -103,6 +109,7 @@ source "amazon-ebs" "githubrunner" {
subnet_id = var.subnet_id
associate_public_ip_address = var.associate_public_ip_address
temporary_security_group_source_public_ip = var.temporary_security_group_source_public_ip
iam_instance_profile = var.iam_instance_profile

source_ami_filter {
filters = {
Expand Down
7 changes: 7 additions & 0 deletions images/windows-core-2019/github_agent.windows.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ variable "instance_type" {
default = "t3a.medium"
}

variable "iam_instance_profile" {
description = "The IAM instance profile to run the builder as"
type = string
default = ""
}

variable "ebs_delete_on_termination" {
description = "Indicates whether the EBS volume is deleted on instance termination."
type = bool
Expand Down Expand Up @@ -67,6 +73,7 @@ source "amazon-ebs" "githubrunner" {
region = var.region
associate_public_ip_address = var.associate_public_ip_address
temporary_security_group_source_public_ip = var.temporary_security_group_source_public_ip
iam_instance_profile = var.iam_instance_profile

source_ami_filter {
filters = {
Expand Down
7 changes: 7 additions & 0 deletions images/windows-core-2022/github_agent.windows.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ variable "security_group_id" {
default = null
}

variable "iam_instance_profile" {
description = "The IAM instance profile to run the builder as"
type = string
default = ""
}

variable "subnet_id" {
description = "If using VPC, the ID of the subnet, such as subnet-12345def, where Packer will launch the EC2 instance. This field is required if you are using an non-default VPC"
type = string
Expand Down Expand Up @@ -80,6 +86,7 @@ source "amazon-ebs" "githubrunner" {
subnet_id = var.subnet_id
associate_public_ip_address = var.associate_public_ip_address
temporary_security_group_source_public_ip = var.temporary_security_group_source_public_ip
iam_instance_profile = var.iam_instance_profile

source_ami_filter {
filters = {
Expand Down
Loading