Skip to content

Commit c8eaaea

Browse files
committed
Refactor distribution out of the runner
1 parent 559e810 commit c8eaaea

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
locals {
2+
action_runner_distribution_object_key = "actions-runner-linux.tar.gz"
3+
}
4+
5+
resource "aws_s3_bucket" "action_dist" {
6+
bucket = var.distribution_bucket_name
7+
acl = "private"
8+
force_destroy = true
9+
tags = var.tags
10+
}
11+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
output "distribution_bucket" {
2+
value = aws_s3_bucket.action_dist
3+
}
4+
5+
output "s3_location_runner_distribution" {
6+
value = "s3://${aws_s3_bucket.action_dist.id}/${local.action_runner_distribution_object_key}"
7+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
variable "aws_region" {
2+
description = "AWS region."
3+
type = string
4+
}
5+
6+
variable "tags" {
7+
description = "Map of tags that will be added to created resources. By default resources will be tagged with name and environment."
8+
type = map(string)
9+
default = {}
10+
}
11+
12+
variable "environment" {
13+
description = "A name that identifies the environment, used as prefix and for tagging."
14+
type = string
15+
}
16+
17+
variable "distribution_bucket_name" {
18+
description = "Bucket for storing the action runner distribution."
19+
type = string
20+
}
21+

0 commit comments

Comments
 (0)