Skip to content

Commit

Permalink
GHA runners - Separate AMI owner filters for linux and windows instan…
Browse files Browse the repository at this point in the history
…ces (#951)
  • Loading branch information
jeanschmidt authored Oct 25, 2022
1 parent e6c764f commit f524390
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
3 changes: 2 additions & 1 deletion terraform-aws-github-runner/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ module "runners" {
block_device_mappings = var.block_device_mappings

runner_architecture = local.runner_architecture
ami_owners = var.ami_owners
ami_owners_linux = var.ami_owners_linux
ami_owners_windows = var.ami_owners_windows
ami_filter_linux = var.ami_filter_linux
ami_filter_windows = var.ami_filter_windows

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
output "files" {
value = null_resource.download.*.triggers.file
value = null_resource.download[*].triggers.file
}
4 changes: 2 additions & 2 deletions terraform-aws-github-runner/modules/runners/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ data "aws_ami" "runner_ami_linux" {
}
}

owners = var.ami_owners
owners = var.ami_owners_linux
}

data "aws_ami" "runner_ami_windows" {
Expand All @@ -53,7 +53,7 @@ data "aws_ami" "runner_ami_windows" {
}
}

owners = var.ami_owners
owners = var.ami_owners_windows
}

resource "aws_launch_template" "linux_runner" {
Expand Down
10 changes: 8 additions & 2 deletions terraform-aws-github-runner/modules/runners/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@ variable "ami_filter_windows" {
}
}

variable "ami_owners" {
description = "The list of owners used to select the AMI of action runner instances."
variable "ami_owners_linux" {
description = "The list of owners used to select the AMI of linux action runner instances."
type = list(string)
default = ["amazon"]
}

variable "ami_owners_windows" {
description = "The list of owners used to select the AMI of windows action runner instances."
type = list(string)
default = ["amazon"]
}
Expand Down
10 changes: 8 additions & 2 deletions terraform-aws-github-runner/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,14 @@ variable "ami_filter_windows" {
}
}

variable "ami_owners" {
description = "The list of owners used to select the AMI of action runner instances."
variable "ami_owners_linux" {
description = "The list of owners used to select the AMI of linux action runner instances."
type = list(string)
default = ["amazon"]
}

variable "ami_owners_windows" {
description = "The list of owners used to select the AMI of windows action runner instances."
type = list(string)
default = ["amazon"]
}
Expand Down

0 comments on commit f524390

Please sign in to comment.