Skip to content

Commit 22b70cc

Browse files
feat: added variables in the root module to allow passing in pre and post install userdata
1 parent ea998c0 commit 22b70cc

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
- Added the ability to pass in pre and post install scripts to the userdata script for the EC2 instances
910

1011
## [0.2.0] - 2020-06-15
1112

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ module "runners" {
7878
instance_profile_path = var.instance_profile_path
7979
role_path = var.role_path
8080
role_permissions_boundary = var.role_permissions_boundary
81+
82+
userdata_pre_install = var.userdata_pre_install
83+
userdata_post_install = var.userdata_post_install
8184
}
8285

8386
module "runner_binaries" {

variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,13 @@ variable "kms_key_id" {
155155
type = string
156156
default = null
157157
}
158+
variable "userdata_pre_install" {
159+
type = string
160+
default = ""
161+
description = "Script to be ran before the GitHub Actions runner is installed on the EC2 instances"
162+
}
163+
variable "userdata_post_install" {
164+
type = string
165+
default = ""
166+
description = "Script to be ran after the GitHub Actions runner is installed on the EC2 instances"
167+
}

0 commit comments

Comments
 (0)