Skip to content

Commit

Permalink
feat: Add associate_public_ip_address variable to windows AMI too (ph…
Browse files Browse the repository at this point in the history
  • Loading branch information
ulich authored Mar 8, 2022
1 parent 828bed6 commit 0b8e1fc
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions images/windows-core-2019/github_agent.windows.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@ variable "ebs_delete_on_termination" {
default = true
}

variable "associate_public_ip_address" {
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"
type = string
default = null
}

source "amazon-ebs" "githubrunner" {
ami_name = "github-runner-windows-core-2019-${formatdate("YYYYMMDDhhmm", timestamp())}"
communicator = "winrm"
instance_type = "t3a.medium"
region = var.region
ami_name = "github-runner-windows-core-2019-${formatdate("YYYYMMDDhhmm", timestamp())}"
communicator = "winrm"
instance_type = "t3a.medium"
region = var.region
associate_public_ip_address = var.associate_public_ip_address

source_ami_filter {
filters = {
name = "Windows_Server-2019-English-Core-ContainersLatest-*"
Expand Down

0 comments on commit 0b8e1fc

Please sign in to comment.