Skip to content

Commit fe9e1e3

Browse files
authored
Apply suggestions from code review
1 parent 80b7a1e commit fe9e1e3

File tree

1 file changed

+11
-13
lines changed
  • tutorials/terraform-dynamic-gitlab-runner

1 file changed

+11
-13
lines changed

tutorials/terraform-dynamic-gitlab-runner/index.mdx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ import Requirements from '@macros/iam/requirements.mdx'
1414
GitLab runners are the components that execute the jobs defined in your GitLab CI/CD pipelines. They can be installed on various operating systems and can run jobs on different platforms. Runners can be configured to be specific to a project or shared across multiple projects.
1515
With terraform Scaleway provider and GitLab one, runners can be dynamically created and destroyed.
1616

17-
## Before you start
18-
19-
To complete the actions presented below, you must have:
17+
<Requirements />
2018

2119
- A Scaleway account logged into the [console](https://console.scaleway.com)
2220
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
@@ -27,19 +25,19 @@ To complete the actions presented below, you must have:
2725

2826
### Gitlab setup
2927

30-
he following GitLab CI/CD needs 3 secret variables :
28+
The following GitLab CI/CD needs 3 secret variables:
3129
- GITLAB_TOKEN
3230
- SCW_SECRET_KEY
3331
- SCW_ACCES_KEY
3432

35-
The `GITLAB_TOKEN` needs to be a GitLab personal access token with the Owner role, and create_runner scope.
33+
The `GITLAB_TOKEN` needs to be a GitLab personal access token with the **Owner** role, and `create_runner` scope.
3634
Create the environment variables in your [project cicd settings](https://docs.gitlab.com/ci/variables/)
3735

3836
### terraform setup
3937

40-
First we have to provide a basic terraform setup :
38+
Start by providing a basic Terraform setup:
4139

42-
1. Create the main.tf file :
40+
1. Create the `main.tf` file:
4341
```hcl
4442
//providers
4543
terraform {
@@ -110,7 +108,7 @@ First we have to provide a basic terraform setup :
110108
value = gitlab_user_runner.project_runner.id
111109
}
112110
```
113-
2. Create the var.tf file :
111+
2. Create the `var.tf` file:
114112
```hcl
115113
variable "project_id" {
116114
type = string
@@ -169,7 +167,7 @@ First we have to provide a basic terraform setup :
169167
description = "volume in Gb"
170168
}
171169
```
172-
3. Create the cloud-init.yml file :
170+
3. Create the `cloud-init.yml` file:
173171
```yml
174172
#cloud-config
175173
package_update: true
@@ -270,7 +268,7 @@ First we have to provide a basic terraform setup :
270268
- terraform init -var-file="env.tfvars"
271269
- terraform apply -destroy -var-file="env.tfvars" -auto-approve
272270
```
273-
2. Create the look.bash file :
271+
2. Create the `look.bash` file:
274272
```bash
275273
#!/bin/bash
276274

@@ -300,12 +298,12 @@ First we have to provide a basic terraform setup :
300298
done
301299
```
302300

303-
With this setup the Gitlab-CI/CD create an instance and register it as a GitLab runner, run the work job on the instance, then delete the instance and the runner.
304-
This setup allows you to dynamically provide high computation runners in a cost-effective way. You can also customize the cloud init to fit your business needs, such as connecting to your company VPN.
301+
With this setup, GitLab-CI/CD creates an Instance and registers it as a GitLab runner, runs the workload on the Instance, then deletes the Instance and the runner.
302+
This setup allows you to dynamically provide high-computation runners in a cost-effective way. You can also customize the cloud init to fit your business needs, such as connecting to your company's VPN.
305303

306304
## Going further
307305

308-
If you want to use a custom instance image, you can edit the `main.tf` file as bellow :
306+
If you want to use a custom Instance image, you can edit the `main.tf` file as below:
309307

310308
```hcl
311309
// ... previous code

0 commit comments

Comments
 (0)