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

Commit 4e97048

Browse files
committed
feat: Remove var.volume_size in favour of var.block_device_mappings
BREAKING CHANGE: var.volume_size replaced by var.block_device_mappings
1 parent 8eb5c88 commit 4e97048

File tree

11 files changed

+27
-36
lines changed

11 files changed

+27
-36
lines changed

Diff for: README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,13 @@ In case the setup does not work as intended follow the trace of events:
360360
| Name | Version |
361361
|------|---------|
362362
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.1 |
363-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 3.50 |
363+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.0 |
364364

365365
## Providers
366366

367367
| Name | Version |
368368
|------|---------|
369-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 3.50 |
369+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.0 |
370370
| <a name="provider_random"></a> [random](#provider\_random) | n/a |
371371

372372
## Modules
@@ -476,7 +476,6 @@ In case the setup does not work as intended follow the trace of events:
476476
| <a name="input_userdata_post_install"></a> [userdata\_post\_install](#input\_userdata\_post\_install) | Script to be ran after the GitHub Actions runner is installed on the EC2 instances | `string` | `""` | no |
477477
| <a name="input_userdata_pre_install"></a> [userdata\_pre\_install](#input\_userdata\_pre\_install) | Script to be ran before the GitHub Actions runner is installed on the EC2 instances | `string` | `""` | no |
478478
| <a name="input_userdata_template"></a> [userdata\_template](#input\_userdata\_template) | Alternative user-data template, replacing the default template. By providing your own user\_data you have to take care of installing all required software, including the action runner. Variables userdata\_pre/post\_install are ignored. | `string` | `null` | no |
479-
| <a name="input_volume_size"></a> [volume\_size](#input\_volume\_size) | (Deprecaated, use block\_device\_mappings. Size of runner volume, if set it overrides the value provide via block\_device\_mappings. | `number` | `null` | no |
480479
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The VPC for security groups of the action runners. | `string` | n/a | yes |
481480
| <a name="input_webhook_lambda_s3_key"></a> [webhook\_lambda\_s3\_key](#input\_webhook\_lambda\_s3\_key) | S3 key for webhook lambda function. Required if using S3 bucket to specify lambdas. | `any` | `null` | no |
482481
| <a name="input_webhook_lambda_s3_object_version"></a> [webhook\_lambda\_s3\_object\_version](#input\_webhook\_lambda\_s3\_object\_version) | S3 object version for webhook lambda function. Useful if S3 versioning is enabled on source bucket. | `any` | `null` | no |

Diff for: examples/default/main.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ module "runners" {
3333
block_device_mappings = []
3434

3535
# Grab zip files via lambda_download
36-
# webhook_lambda_zip = "lambdas-download/webhook.zip"
37-
# runner_binaries_syncer_lambda_zip = "lambdas-download/runner-binaries-syncer.zip"
38-
# runners_lambda_zip = "lambdas-download/runners.zip"
36+
webhook_lambda_zip = "lambdas-download/webhook.zip"
37+
runner_binaries_syncer_lambda_zip = "lambdas-download/runner-binaries-syncer.zip"
38+
runners_lambda_zip = "lambdas-download/runners.zip"
3939

40-
enable_organization_runners = true
40+
enable_organization_runners = false
4141
runner_extra_labels = "default,example"
4242

4343
# enable access to the runners via SSM

Diff for: main.tf

-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ module "runners" {
162162
enable_ssm_on_runners = var.enable_ssm_on_runners
163163
egress_rules = var.runner_egress_rules
164164
runner_additional_security_group_ids = var.runner_additional_security_group_ids
165-
volume_size = var.volume_size
166165
metadata_options = var.runner_metadata_options
167166

168167
lambda_s3_bucket = var.lambda_s3_bucket

Diff for: modules/download-lambda/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module "lambdas" {
3030
| Name | Version |
3131
|------|---------|
3232
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.1 |
33-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 3.38 |
33+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.0 |
3434

3535
## Providers
3636

Diff for: modules/runner-binaries-syncer/README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ yarn run dist
3939
| Name | Version |
4040
|------|---------|
4141
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.1 |
42-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 3.38 |
42+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.0 |
4343

4444
## Providers
4545

4646
| Name | Version |
4747
|------|---------|
48-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 3.38 |
48+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.0 |
4949

5050
## Modules
5151

@@ -59,16 +59,22 @@ No modules.
5959
| [aws_cloudwatch_event_target.syncer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource |
6060
| [aws_cloudwatch_log_group.syncer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
6161
| [aws_iam_role.syncer_lambda](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
62+
| [aws_iam_role_policy.lambda_kms](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
6263
| [aws_iam_role_policy.lambda_logging](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
6364
| [aws_iam_role_policy.syncer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
6465
| [aws_lambda_function.syncer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) | resource |
6566
| [aws_lambda_permission.on_deploy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |
6667
| [aws_lambda_permission.syncer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |
6768
| [aws_s3_bucket.action_dist](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
69+
| [aws_s3_bucket_acl.action_dist_acl](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl) | resource |
70+
| [aws_s3_bucket_lifecycle_configuration.bucket-config](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |
6871
| [aws_s3_bucket_notification.on_deploy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_notification) | resource |
69-
| [aws_s3_bucket_object.trigger](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object) | resource |
72+
| [aws_s3_bucket_policy.action_dist_sse_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource |
7073
| [aws_s3_bucket_public_access_block.action_dist](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource |
74+
| [aws_s3_bucket_server_side_encryption_configuration.action_dist](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_server_side_encryption_configuration) | resource |
75+
| [aws_s3_object.trigger](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_object) | resource |
7176
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
77+
| [aws_iam_policy_document.action_dist_sse_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
7278
| [aws_iam_policy_document.lambda_assume_role_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
7379

7480
## Inputs

Diff for: modules/runners/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ yarn run dist
5353
| Name | Version |
5454
|------|---------|
5555
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.1 |
56-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 3.38 |
56+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.0 |
5757

5858
## Providers
5959

6060
| Name | Version |
6161
|------|---------|
62-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 3.38 |
62+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.0 |
6363

6464
## Modules
6565

@@ -186,7 +186,6 @@ yarn run dist
186186
| <a name="input_userdata_post_install"></a> [userdata\_post\_install](#input\_userdata\_post\_install) | User-data script snippet to insert after GitHub action runner install | `string` | `""` | no |
187187
| <a name="input_userdata_pre_install"></a> [userdata\_pre\_install](#input\_userdata\_pre\_install) | User-data script snippet to insert before GitHub action runner install | `string` | `""` | no |
188188
| <a name="input_userdata_template"></a> [userdata\_template](#input\_userdata\_template) | Alternative user-data template, replacing the default template. By providing your own user\_data you have to take care of installing all required software, including the action runner. Variables userdata\_pre/post\_install are ignored. | `string` | `null` | no |
189-
| <a name="input_volume_size"></a> [volume\_size](#input\_volume\_size) | (Deprecaated, use block\_device\_mappings. Size of runner volume, if set it overrides the value provide via block\_device\_mappings. | `number` | `null` | no |
190189
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | The VPC for the security groups. | `string` | n/a | yes |
191190

192191
## Outputs

Diff for: modules/runners/main.tf

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ resource "aws_launch_template" "runner" {
6262
device_name = lookup(block_device_mappings.value, "device_name", "/dev/xvda")
6363

6464
ebs {
65-
delete_on_termination = lookup(block_device_mappings.value, "delete_on_termination", true)
66-
volume_type = lookup(block_device_mappings.value, "volume_type", "gp3")
67-
volume_size = var.volume_size == null ? lookup(block_device_mappings.value, "volume_size", "30") : var.volume_size
68-
encrypted = lookup(block_device_mappings.value, "encrypted", true)
69-
iops = lookup(block_device_mappings.value, "iops", null)
65+
delete_on_termination = block_device_mappings.value.delete_on_termination
66+
volume_type = block_device_mappings.value.volume_type
67+
volume_size = block_device_mappings.value.volume_size
68+
encrypted = block_device_mappings.value.encrypted
69+
iops = block_device_mappings.value.iops
7070
}
7171
}
7272
}

Diff for: modules/runners/variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,6 @@ variable "runner_additional_security_group_ids" {
403403
default = []
404404
}
405405

406-
variable "volume_size" {
407-
description = "(Deprecaated, use block_device_mappings. Size of runner volume, if set it overrides the value provide via block_device_mappings."
408-
type = number
409-
default = null
410-
}
411-
412406
variable "kms_key_arn" {
413407
description = "Optional CMK Key ARN to be used for Parameter Store."
414408
type = string

Diff for: modules/setup-iam-permissions/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ Next execute the created Terraform code `terraform init && terraform apply` The
4242
| Name | Version |
4343
|------|---------|
4444
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.1 |
45-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 3.38 |
45+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.0 |
4646

4747
## Providers
4848

4949
| Name | Version |
5050
|------|---------|
51-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 3.38 |
51+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.0 |
5252

5353
## Modules
5454

Diff for: modules/webhook/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ yarn run dist
3939
| Name | Version |
4040
|------|---------|
4141
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14.1 |
42-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 3.38 |
42+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.0 |
4343

4444
## Providers
4545

4646
| Name | Version |
4747
|------|---------|
48-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 3.38 |
48+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.0 |
4949

5050
## Modules
5151

Diff for: variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,6 @@ variable "instance_max_spot_price" {
396396
default = null
397397
}
398398

399-
variable "volume_size" {
400-
description = "(Deprecaated, use block_device_mappings. Size of runner volume, if set it overrides the value provide via block_device_mappings."
401-
type = number
402-
default = null
403-
}
404-
405399
variable "instance_type" {
406400
description = "[DEPRECATED] See instance_types."
407401
type = string

0 commit comments

Comments
 (0)