Skip to content

Commit b94728c

Browse files
authored
Upgrade to Terraform 13 (#251)
* Upgrade to Terraform 13 * Update version add dependabot (#250) * Upgrade to terraform 13 * Upgrade to terraform 13
1 parent a6aaa17 commit b94728c

File tree

9 files changed

+76
-26
lines changed

9 files changed

+76
-26
lines changed

README.md

-17
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,6 @@
66
77
> "Added support to download docker machine from a different location, e.g. <https://gitlab.com/gitlab-org/ci-cd/docker-machine>"
88
9-
## Terraform versions
10-
11-
### Terraform 0.12
12-
13-
Module is available as Terraform 0.12 module, pin to version 4.x. Please submit pull-requests to the `develop` branch.
14-
15-
Migration from 0.11 to 0.12 is tested for the `runner-default` example. To migrate the runner, execute the following steps.
16-
17-
- Update to Terraform 0.12
18-
- Migrate your Terraform code via Terraform `terraform 0.12upgrade`.
19-
- Update the module from 3.10.0 to 4.0.0, next run `terraform init`
20-
- Run `terraform apply`. This should trigger only a re-creation of the the auto launch configuration and a minor change in the auto-scaling group.
21-
22-
### Terraform 0.11
23-
24-
Module is available as Terraform 0.11 module, pin module to version 3.x. Please submit pull-requests to the `terraform011` branch.
25-
269
## The module
2710

2811
This [Terraform](https://www.terraform.io/) modules creates a [GitLab CI runner](https://docs.gitlab.com/runner/). A blog post describes the original version of the the runner. See the post at [040code](https://040code.github.io/2017/12/09/runners-on-the-spot/). The original setup of the module is based on the blog post: [Auto scale GitLab CI runners and save 90% on EC2 costs](https://about.gitlab.com/2017/11/23/autoscale-ci-runners/).

ci/bin/terraform.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
export TARGET_DIR=/opt
44
export PATH=${TARGET_DIR}:${PATH}
55

6-
TERRAFORM_VERSION=${1:-"0.12.29"}
6+
TERRAFORM_VERSION=${1:-"0.13.6"}
77
OS=${2:-"linux"}
88
TERRAFORM_URL="https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_${OS}_amd64.zip"
99

examples/.terraform-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.12.29
1+
0.13.6

examples/runner-default/providers.tf

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
provider "aws" {
22
region = var.aws_region
3-
version = "2.68"
3+
version = "~> 3.23.0"
44
}
55

66
provider "local" {
77
version = "1.4"
88
}
99

1010
provider "null" {
11-
version = "2.1.2"
11+
version = "~> 3.0.0"
1212
}
1313

1414
provider "tls" {
1515
version = "2.2.0"
1616
}
17+
18+
provider "random" {
19+
version = "~> 3.0.1"
20+
}

examples/runner-default/versions.tf

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11

22
terraform {
3-
required_version = ">= 0.12"
3+
required_version = ">= 0.13"
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
}
8+
local = {
9+
source = "hashicorp/local"
10+
}
11+
null = {
12+
source = "hashicorp/null"
13+
}
14+
tls = {
15+
source = "hashicorp/tls"
16+
}
17+
}
418
}

examples/runner-docker/versions.tf

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
21
terraform {
3-
required_version = ">= 0.12"
2+
required_providers {
3+
aws = {
4+
source = "hashicorp/aws"
5+
}
6+
local = {
7+
source = "hashicorp/local"
8+
}
9+
null = {
10+
source = "hashicorp/null"
11+
}
12+
tls = {
13+
source = "hashicorp/tls"
14+
}
15+
}
16+
required_version = ">= 0.13"
417
}
+15-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11

22
terraform {
3-
required_version = ">= 0.12"
3+
required_version = ">= 0.13"
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
}
8+
local = {
9+
source = "hashicorp/local"
10+
}
11+
null = {
12+
source = "hashicorp/null"
13+
}
14+
tls = {
15+
source = "hashicorp/tls"
16+
}
17+
}
418
}

examples/runner-public/versions.tf

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11

22
terraform {
3-
required_version = ">= 0.12"
3+
required_version = ">= 0.13"
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
}
8+
local = {
9+
source = "hashicorp/local"
10+
}
11+
null = {
12+
source = "hashicorp/null"
13+
}
14+
tls = {
15+
source = "hashicorp/tls"
16+
}
17+
}
418
}

versions.tf

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11

22
terraform {
33
required_version = ">= 0.12"
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
}
8+
null = {
9+
source = "hashicorp/null"
10+
}
11+
}
412
}

0 commit comments

Comments
 (0)