Skip to content

Commit 515e1dd

Browse files
authored
fix: Upgrade vpc module and provider versions (cattle-ops#283)
* fix: Upgrade vpc module and provider versions * fix: Upgrade vpc module and provider versions
1 parent 5eb3cf2 commit 515e1dd

File tree

15 files changed

+86
-75
lines changed

15 files changed

+86
-75
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: git://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.30.0
3+
rev: v1.45.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_tflint

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ terraform destroy
256256
| arn\_format | ARN format to be used. May be changed to support deployment in GovCloud/China regions. | `string` | `"arn:aws"` | no |
257257
| aws\_region | AWS region. | `string` | n/a | yes |
258258
| aws\_zone | Deprecated. Will be removed in the next major release. | `string` | `"a"` | no |
259-
| cache\_bucket | Configuration to control the creation of the cache bucket. By default the bucket will be created and used as shared cache. To use the same cache across multiple runners disable the creation of the cache and provide a policy and bucket name. See the public runner example for more details. | `map` | <pre>{<br> "bucket": "",<br> "create": true,<br> "policy": ""<br>}</pre> | no |
259+
| cache\_bucket | Configuration to control the creation of the cache bucket. By default the bucket will be created and used as shared cache. To use the same cache across multiple runners disable the creation of the cache and provide a policy and bucket name. See the public runner example for more details. | `map(any)` | <pre>{<br> "bucket": "",<br> "create": true,<br> "policy": ""<br>}</pre> | no |
260260
| cache\_bucket\_name\_include\_account\_id | Boolean to add current account ID to cache bucket name. | `bool` | `true` | no |
261261
| cache\_bucket\_prefix | Prefix for s3 cache bucket name. | `string` | `""` | no |
262262
| cache\_bucket\_set\_random\_suffix | Append the cache bucket name with a random string suffix | `bool` | `false` | no |
@@ -269,6 +269,7 @@ terraform destroy
269269
| docker\_machine\_instance\_type | Instance type used for the instances hosting docker-machine. | `string` | `"m5.large"` | no |
270270
| docker\_machine\_options | List of additional options for the docker machine config. Each element of this list must be a key=value pair. E.g. '["amazonec2-zone=a"]' | `list(string)` | `[]` | no |
271271
| docker\_machine\_role\_json | Docker machine runner instance override policy, expected to be in JSON format. | `string` | `""` | no |
272+
| docker\_machine\_security\_group\_description | A description for the docker-machine security group | `string` | `"A security group containing docker-machine instances"` | no |
272273
| docker\_machine\_spot\_price\_bid | Spot price bid. | `string` | `"0.06"` | no |
273274
| docker\_machine\_version | By default docker\_machine\_download\_url is used to set the docker machine version. Version of docker-machine. The version will be ingored once `docker_machine_download_url` is set. | `string` | `""` | no |
274275
| enable\_asg\_recreation | Enable automatic redeployment of the Runner ASG when the Launch Configs change. | `bool` | `true` | no |
@@ -286,6 +287,7 @@ terraform destroy
286287
| environment | A name that identifies the environment, used as prefix and for tagging. | `string` | n/a | yes |
287288
| gitlab\_runner\_egress\_rules | List of egress rules for the gitlab runner instance. | <pre>list(object({<br> cidr_blocks = list(string)<br> ipv6_cidr_blocks = list(string)<br> prefix_list_ids = list(string)<br> from_port = number<br> protocol = string<br> security_groups = list(string)<br> self = bool<br> to_port = number<br> description = string<br> }))</pre> | <pre>[<br> {<br> "cidr_blocks": [<br> "0.0.0.0/0"<br> ],<br> "description": null,<br> "from_port": 0,<br> "ipv6_cidr_blocks": [<br> "::/0"<br> ],<br> "prefix_list_ids": null,<br> "protocol": "-1",<br> "security_groups": null,<br> "self": null,<br> "to_port": 0<br> }<br>]</pre> | no |
288289
| gitlab\_runner\_registration\_config | Configuration used to register the runner. See the README for an example, or reference the examples in the examples directory of this repo. | `map(string)` | <pre>{<br> "access_level": "",<br> "description": "",<br> "locked_to_project": "",<br> "maximum_timeout": "",<br> "registration_token": "",<br> "run_untagged": "",<br> "tag_list": ""<br>}</pre> | no |
290+
| gitlab\_runner\_security\_group\_description | A description for the gitlab-runner security group | `string` | `"A security group containing gitlab-runner agent instances"` | no |
289291
| gitlab\_runner\_security\_group\_ids | A list of security group ids that are allowed to access the gitlab runner agent | `list(string)` | `[]` | no |
290292
| gitlab\_runner\_ssh\_cidr\_blocks | List of CIDR blocks to allow SSH Access to the gitlab runner instance. | `list(string)` | `[]` | no |
291293
| gitlab\_runner\_version | Version of the GitLab runner. | `string` | `"13.7.0"` | no |
@@ -306,7 +308,7 @@ terraform destroy
306308
| runner\_instance\_spot\_price | By setting a spot price bid price the runner agent will be created via a spot request. Be aware that spot instances can be stopped by AWS. | `string` | `null` | no |
307309
| runner\_root\_block\_device | The EC2 instance root block device configuration. Takes the following keys: `delete_on_termination`, `volume_type`, `volume_size`, `encrypted`, `iops` | `map(string)` | `{}` | no |
308310
| runner\_tags | Map of tags that will be added to runner EC2 instances. | `map(string)` | `{}` | no |
309-
| runners\_additional\_volumes | Additional volumes that will be used in the runner config.toml, e.g Docker socket | `list` | `[]` | no |
311+
| runners\_additional\_volumes | Additional volumes that will be used in the runner config.toml, e.g Docker socket | `list(any)` | `[]` | no |
310312
| runners\_concurrent | Concurrent value for the runners, will be used in the runner config.toml. | `number` | `10` | no |
311313
| runners\_docker\_runtime | docker runtime for runners, will be used in the runner config.toml | `string` | `""` | no |
312314
| runners\_ebs\_optimized | Enable runners to be EBS-optimized. | `bool` | `true` | no |
@@ -340,7 +342,7 @@ terraform destroy
340342
| runners\_token | Token for the runner, will be used in the runner config.toml. | `string` | `"__REPLACED_BY_USER_DATA__"` | no |
341343
| runners\_use\_private\_address | Restrict runners to the use of a private IP address | `bool` | `true` | no |
342344
| runners\_volumes\_tmpfs | n/a | <pre>list(object({<br> volume = string<br> options = string<br> }))</pre> | `[]` | no |
343-
| schedule\_config | Map containing the configuration of the ASG scale-in and scale-up for the runner instance. Will only be used if enable\_schedule is set to true. | `map` | <pre>{<br> "scale_in_count": 0,<br> "scale_in_recurrence": "0 18 * * 1-5",<br> "scale_out_count": 1,<br> "scale_out_recurrence": "0 8 * * 1-5"<br>}</pre> | no |
345+
| schedule\_config | Map containing the configuration of the ASG scale-in and scale-up for the runner instance. Will only be used if enable\_schedule is set to true. | `map(any)` | <pre>{<br> "scale_in_count": 0,<br> "scale_in_recurrence": "0 18 * * 1-5",<br> "scale_out_count": 1,<br> "scale_out_recurrence": "0 8 * * 1-5"<br>}</pre> | no |
344346
| secure\_parameter\_store\_runner\_token\_key | The key name used store the Gitlab runner token in Secure Parameter Store | `string` | `"runner-token"` | no |
345347
| ssh\_key\_pair | Set this to use existing AWS key pair | `string` | `null` | no |
346348
| subnet\_id\_runners | List of subnets used for hosting the gitlab-runners. | `string` | n/a | yes |

examples/runner-default/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ data "aws_security_group" "default" {
99

1010
module "vpc" {
1111
source = "terraform-aws-modules/vpc/aws"
12-
version = "2.48"
12+
version = "2.70"
1313

1414
name = "vpc-${var.environment}"
1515
cidr = "10.0.0.0/16"

examples/runner-default/providers.tf

+5-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
provider "aws" {
2-
region = var.aws_region
3-
version = "~> 3.23.0"
2+
region = var.aws_region
43
}
54

6-
provider "local" {
7-
version = "1.4"
8-
}
5+
provider "local" {}
96

10-
provider "null" {
11-
version = "~> 3.0.0"
12-
}
7+
provider "null" {}
138

14-
provider "tls" {
15-
version = "2.2.0"
16-
}
9+
provider "tls" {}
1710

18-
provider "random" {
19-
version = "~> 3.0.1"
20-
}
11+
provider "random" {}

examples/runner-default/versions.tf

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,24 @@ terraform {
33
required_version = ">= 0.13"
44
required_providers {
55
aws = {
6-
source = "hashicorp/aws"
6+
source = "hashicorp/aws"
7+
version = "~> 3.23"
78
}
89
local = {
9-
source = "hashicorp/local"
10+
source = "hashicorp/local"
11+
version = "~> 1.4"
1012
}
1113
null = {
12-
source = "hashicorp/null"
14+
source = "hashicorp/null"
15+
version = "~> 3.0"
1316
}
1417
tls = {
15-
source = "hashicorp/tls"
18+
source = "hashicorp/tls"
19+
version = "~> 2.2"
20+
}
21+
random = {
22+
source = "hashicorp/random"
23+
version = "~> 3.0"
1624
}
1725
}
1826
}

examples/runner-docker/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ data "aws_availability_zones" "available" {
44

55
module "vpc" {
66
source = "terraform-aws-modules/vpc/aws"
7-
version = "2.48"
7+
version = "2.70"
88

99
name = "vpc-${var.environment}"
1010
cidr = "10.1.0.0/16"

examples/runner-docker/providers.tf

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
provider "aws" {
2-
region = var.aws_region
3-
version = "2.68"
2+
region = var.aws_region
43
}
54

6-
provider "local" {
7-
version = "1.4"
8-
}
5+
provider "local" {}
96

10-
provider "null" {
11-
version = "2.1.2"
12-
}
7+
provider "null" {}
138

14-
provider "tls" {
15-
version = "2.2.0"
16-
}
9+
provider "tls" {}
10+
11+
provider "random" {}

examples/runner-docker/versions.tf

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1+
12
terraform {
3+
required_version = ">= 0.13"
24
required_providers {
35
aws = {
4-
source = "hashicorp/aws"
6+
source = "hashicorp/aws"
7+
version = "~> 3.23"
58
}
69
local = {
7-
source = "hashicorp/local"
10+
source = "hashicorp/local"
11+
version = "~> 1.4"
812
}
913
null = {
10-
source = "hashicorp/null"
14+
source = "hashicorp/null"
15+
version = "~> 3.0"
1116
}
1217
tls = {
13-
source = "hashicorp/tls"
18+
source = "hashicorp/tls"
19+
version = "~> 2.2"
20+
}
21+
random = {
22+
source = "hashicorp/random"
23+
version = "~> 3.0"
1424
}
1525
}
16-
required_version = ">= 0.13"
1726
}

examples/runner-pre-registered/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ data "aws_availability_zones" "available" {
44

55
module "vpc" {
66
source = "terraform-aws-modules/vpc/aws"
7-
version = "2.48"
7+
version = "2.70"
88

99
name = "vpc-${var.environment}"
1010
cidr = "10.0.0.0/16"
+6-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
provider "aws" {
2-
region = var.aws_region
3-
version = "2.68"
2+
region = var.aws_region
43
}
54

6-
provider "local" {
7-
version = "1.4"
8-
}
5+
provider "local" {}
96

10-
provider "null" {
11-
version = "2.1.2"
12-
}
7+
provider "null" {}
138

14-
provider "tls" {
15-
version = "2.2.0"
16-
}
9+
provider "tls" {}
10+
11+
provider "random" {}

examples/runner-pre-registered/versions.tf

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,24 @@ terraform {
33
required_version = ">= 0.13"
44
required_providers {
55
aws = {
6-
source = "hashicorp/aws"
6+
source = "hashicorp/aws"
7+
version = "~> 3.23"
78
}
89
local = {
9-
source = "hashicorp/local"
10+
source = "hashicorp/local"
11+
version = "~> 1.4"
1012
}
1113
null = {
12-
source = "hashicorp/null"
14+
source = "hashicorp/null"
15+
version = "~> 3.0"
1316
}
1417
tls = {
15-
source = "hashicorp/tls"
18+
source = "hashicorp/tls"
19+
version = "~> 2.2"
20+
}
21+
random = {
22+
source = "hashicorp/random"
23+
version = "~> 3.0"
1624
}
1725
}
1826
}

examples/runner-public/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ data "aws_availability_zones" "available" {
44

55
module "vpc" {
66
source = "terraform-aws-modules/vpc/aws"
7-
version = "2.48"
7+
version = "2.70"
88

99
name = "vpc-${var.environment}"
1010
cidr = "10.1.0.0/16"

examples/runner-public/providers.tf

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
provider "aws" {
2-
region = var.aws_region
3-
version = "2.68"
2+
region = var.aws_region
43
}
54

6-
provider "local" {
7-
version = "1.4"
8-
}
5+
provider "local" {}
96

10-
provider "null" {
11-
version = "2.1.2"
12-
}
7+
provider "null" {}
138

14-
provider "tls" {
15-
version = "2.2.0"
16-
}
9+
provider "tls" {}
10+
11+
provider "random" {}

examples/runner-public/versions.tf

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,24 @@ terraform {
33
required_version = ">= 0.13"
44
required_providers {
55
aws = {
6-
source = "hashicorp/aws"
6+
source = "hashicorp/aws"
7+
version = "~> 3.23"
78
}
89
local = {
9-
source = "hashicorp/local"
10+
source = "hashicorp/local"
11+
version = "~> 1.4"
1012
}
1113
null = {
12-
source = "hashicorp/null"
14+
source = "hashicorp/null"
15+
version = "~> 3.0"
1316
}
1417
tls = {
15-
source = "hashicorp/tls"
18+
source = "hashicorp/tls"
19+
version = "~> 2.2"
20+
}
21+
random = {
22+
source = "hashicorp/random"
23+
version = "~> 3.0"
1624
}
1725
}
1826
}

variables.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ variable "runners_privileged" {
161161

162162
variable "runners_additional_volumes" {
163163
description = "Additional volumes that will be used in the runner config.toml, e.g Docker socket"
164-
type = list
164+
type = list(any)
165165
default = []
166166
}
167167

@@ -532,7 +532,7 @@ variable "overrides" {
532532

533533
variable "cache_bucket" {
534534
description = "Configuration to control the creation of the cache bucket. By default the bucket will be created and used as shared cache. To use the same cache across multiple runners disable the creation of the cache and provide a policy and bucket name. See the public runner example for more details."
535-
type = map
535+
type = map(any)
536536

537537
default = {
538538
create = true
@@ -555,7 +555,7 @@ variable "enable_schedule" {
555555

556556
variable "schedule_config" {
557557
description = "Map containing the configuration of the ASG scale-in and scale-up for the runner instance. Will only be used if enable_schedule is set to true. "
558-
type = map
558+
type = map(any)
559559
default = {
560560
scale_in_recurrence = "0 18 * * 1-5"
561561
scale_in_count = 0

0 commit comments

Comments
 (0)