Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 0b8e1fc

Browse files
authored
feat: Add associate_public_ip_address variable to windows AMI too (#1819)
See https://github.com/philips-labs/terraform-aws-github-runner/pull/1816#issuecomment-1060650668
1 parent 828bed6 commit 0b8e1fc

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Diff for: images/windows-core-2019/github_agent.windows.pkr.hcl

+12-4
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,19 @@ variable "ebs_delete_on_termination" {
2525
default = true
2626
}
2727

28+
variable "associate_public_ip_address" {
29+
description = "If using a non-default VPC, there is no public IP address assigned to the EC2 instance. If you specified a public subnet, you probably want to set this to true. Otherwise the EC2 instance won't have access to the internet"
30+
type = string
31+
default = null
32+
}
33+
2834
source "amazon-ebs" "githubrunner" {
29-
ami_name = "github-runner-windows-core-2019-${formatdate("YYYYMMDDhhmm", timestamp())}"
30-
communicator = "winrm"
31-
instance_type = "t3a.medium"
32-
region = var.region
35+
ami_name = "github-runner-windows-core-2019-${formatdate("YYYYMMDDhhmm", timestamp())}"
36+
communicator = "winrm"
37+
instance_type = "t3a.medium"
38+
region = var.region
39+
associate_public_ip_address = var.associate_public_ip_address
40+
3341
source_ami_filter {
3442
filters = {
3543
name = "Windows_Server-2019-English-Core-ContainersLatest-*"

0 commit comments

Comments
 (0)