Skip to content
Permalink
Browse files
Make AMI available in eu-central-1 and us-east-2 regions (#26)
  • Loading branch information
ashb committed May 7, 2021
1 parent b99d17c commit 67d11b51d8648c76dc22f337a4c27bc96d62bcf7
Showing 2 changed files with 15 additions and 12 deletions.
@@ -21,11 +21,8 @@ variable "vpc_id" {
variable "ami_name" {
type = string
}
variable "aws_region" {
type = string
}
variable "subnet_id" {
type = string
variable "aws_regions" {
type = list(string)
}
variable "packer_role_arn" {
type = string
@@ -44,20 +41,27 @@ source "amazon-ebs" "runner_builder" {
}
#access_key = ""
#secret_key = ""
region = var.aws_region
region = var.aws_regions[0]
ami_name = "${var.ami_name}-${var.runner_version}"
ami_regions = [var.aws_region]
ami_regions = var.aws_regions
tag {
key = "ami"
value = "github-runner-ami"
key = "Name"
value = "github-runner-ami"
}
snapshot_tag {
key = "Name"
value = "github-runner-ami-root"
}
encrypt_boot = false
instance_type = "t3.micro"
communicator = "ssh"
ssh_username = "ubuntu"
ssh_interface = "session_manager"
iam_instance_profile = var.session_manager_instance_profile_name
subnet_id = var.subnet_id
subnet_filter {
# Just pick a random subnet in the VPC -- we only have the three defaults so this is fine!
random = true
}
vpc_id = var.vpc_id
source_ami_filter {
filters = {
@@ -17,8 +17,7 @@

vpc_id = "vpc-d73487bd"
ami_name = "airflow-runner-ami"
aws_region = "eu-central-1"
subnet_id = "subnet-72ed3c0e"
aws_regions = ["eu-central-1", "us-east-2"]
packer_role_arn = "arn:aws:iam::827901512104:role/packer-role"
runner_version = "2.278.0-airflow2"
session_manager_instance_profile_name = "packer_ssm_instance_profile"

0 comments on commit 67d11b5

Please sign in to comment.