Skip to content

Commit d959205

Browse files
authored
chore: refactor master to main (#452)
* chore: refactor master to main * update
1 parent 583700c commit d959205

File tree

9 files changed

+58
-65
lines changed

9 files changed

+58
-65
lines changed

Diff for: .github/workflows/ci.yml

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: CI
2-
on:
2+
on:
33
push:
44
branches:
5-
- master
5+
- main
66
- develop
77
pull_request:
88

@@ -11,7 +11,7 @@ jobs:
1111
name: Verify module
1212
strategy:
1313
matrix:
14-
terraform: [1.0.8]
14+
terraform: [1.0.8]
1515
runs-on: ubuntu-latest
1616
container:
1717
image: hashicorp/terraform:${{ matrix.terraform }}
@@ -26,23 +26,29 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
terraform: [0.13.0, 0.14.0, 0.15.0, 1.0.8]
29-
example: ["runner-default", "runner-docker", "runner-multi-region", "runner-pre-registered", "runner-public"]
29+
example:
30+
[
31+
"runner-default",
32+
"runner-docker",
33+
"runner-multi-region",
34+
"runner-pre-registered",
35+
"runner-public",
36+
]
3037
defaults:
3138
run:
3239
working-directory: examples/${{ matrix.example }}
3340
runs-on: ubuntu-latest
3441
container:
3542
image: hashicorp/terraform:${{ matrix.terraform }}
36-
steps:
43+
steps:
3744
- uses: actions/checkout@v2
3845
- run: terraform init -get -backend=false -input=false
3946
- if: contains(matrix.terraform, '1.0.')
4047
run: terraform fmt -recursive -check=true -write=false
4148
- run: terraform validate
4249

43-
4450
release:
45-
if: github.event_name != 'pull_request' && contains('refs/heads/master', github.ref)
51+
if: github.event_name != 'pull_request' && contains('refs/heads/main', github.ref)
4652
name: Release
4753
needs: [verify_module, verify_examples]
4854
runs-on: ubuntu-latest

Diff for: .releaserc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"branches": [
33
{
4-
"name": "master"
4+
"name": "main"
55
},
66
{
77
"name": "develop",

Diff for: README.md

+3-16
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ The runner supports 3 main scenarios:
4545

4646
In this scenario the runner agent is running on a single EC2 node and runners are created by [docker machine](https://docs.gitlab.com/runner/configuration/autoscale.html) using spot instances. Runners will scale automatically based on the configuration. The module creates a S3 cache by default, which is shared across runners (spot instances).
4747

48-
![runners-default](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-default.png)
48+
![runners-default](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-default.png)
4949

5050
### GitLab CI docker-machine runner - multiple runner agents
5151

5252
In this scenario the multiple runner agents can be created with different configuration by instantiating the module multiple times. Runners will scale automatically based on the configuration. The S3 cache can be shared across runners by managing the cache outside of the module.
5353

54-
![runners-cache](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-cache.png)
54+
![runners-cache](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-cache.png)
5555

5656
### GitLab Ci docker runner
5757

5858
In this scenario _not_ docker machine is used but docker to schedule the builds. Builds will run on the same EC2 instance as the agent. No auto scaling is supported.
5959

60-
![runners-docker](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-docker.png)
60+
![runners-docker](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-docker.png)
6161

6262
## Prerequisites
6363

@@ -321,27 +321,20 @@ terraform destroy
321321

322322
| Name | Type |
323323
|------|------|
324-
| [archive_file.terminate_runner_instances_lambda](https://registry.terraform.io/providers/hashicorp/archive/latest/docs/data-sources/file) | data source |
325324
| [aws_autoscaling_group.gitlab_runner_instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group) | resource |
326-
| [aws_autoscaling_lifecycle_hook.terminate_instances](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_lifecycle_hook) | resource |
327325
| [aws_autoscaling_schedule.scale_in](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_schedule) | resource |
328326
| [aws_autoscaling_schedule.scale_out](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_schedule) | resource |
329-
| [aws_cloudwatch_event_rule.terminate_instances](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule) | resource |
330-
| [aws_cloudwatch_event_target.terminate_instances](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource |
331327
| [aws_cloudwatch_log_group.environment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
332-
| [aws_cloudwatch_log_group.lambda](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
333328
| [aws_eip.gitlab_runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip) | resource |
334329
| [aws_iam_instance_profile.docker_machine](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile) | resource |
335330
| [aws_iam_instance_profile.instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile) | resource |
336331
| [aws_iam_policy.eip](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
337332
| [aws_iam_policy.instance_docker_machine_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
338333
| [aws_iam_policy.instance_session_manager_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
339-
| [aws_iam_policy.lambda](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
340334
| [aws_iam_policy.service_linked_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
341335
| [aws_iam_policy.ssm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
342336
| [aws_iam_role.docker_machine](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
343337
| [aws_iam_role.instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
344-
| [aws_iam_role.lambda](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
345338
| [aws_iam_role_policy.instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
346339
| [aws_iam_role_policy_attachment.docker_machine_cache_instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
347340
| [aws_iam_role_policy_attachment.docker_machine_session_manager_aws_managed](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
@@ -350,17 +343,11 @@ terraform destroy
350343
| [aws_iam_role_policy_attachment.instance_docker_machine_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
351344
| [aws_iam_role_policy_attachment.instance_session_manager_aws_managed](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
352345
| [aws_iam_role_policy_attachment.instance_session_manager_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
353-
| [aws_iam_role_policy_attachment.lambda](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
354346
| [aws_iam_role_policy_attachment.service_linked_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
355347
| [aws_iam_role_policy_attachment.ssm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
356348
| [aws_iam_role_policy_attachment.user_defined_policies](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
357-
| [aws_iam_policy_document.assume_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
358-
| [aws_iam_policy_document.lambda](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
359349
| [aws_kms_alias.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_alias) | resource |
360350
| [aws_kms_key.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource |
361-
| [aws_lambda_function.terminate_runner_instances](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) | resource |
362-
| [aws_lambda_permission.current_version_triggers](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |
363-
| [aws_lambda_permission.unqualified_alias_triggers](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |
364351
| [aws_launch_template.gitlab_runner_instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) | resource |
365352
| [aws_security_group.docker_machine](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
366353
| [aws_security_group.runner](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |

Diff for: examples/runner-default/README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This examples shows:
1010
- Auto scaling using `docker+machine` executor.
1111
- Addtional security groups that are allowed access to the runner agent
1212

13-
![runners-default](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-default.png)
13+
![runners-default](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-default.png)
1414

1515
## Prerequisite
1616

@@ -19,20 +19,20 @@ The Terraform version is managed using [tfenv](https://github.com/Zordrak/tfenv)
1919
## Providers
2020

2121
| Name | Version |
22-
|------|---------|
23-
| aws | 2.56 |
24-
| null | 2.1.2 |
22+
| ---- | ------- |
23+
| aws | 2.56 |
24+
| null | 2.1.2 |
2525

2626
## Inputs
2727

28-
| Name | Description | Type | Default | Required |
29-
|------|-------------|------|---------|:-----:|
30-
| aws\_region | AWS region. | `string` | `"eu-west-1"` | no |
31-
| environment | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runners-default"` | no |
32-
| gitlab\_url | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no |
33-
| registration\_token | n/a | `any` | n/a | yes |
34-
| runner\_name | Name of the runner, will be used in the runner config.toml | `string` | `"default-auto"` | no |
35-
| timezone | Name of the timezone that the runner will be used in. | `string` | `"Europe/Amsterdam"` | no |
28+
| Name | Description | Type | Default | Required |
29+
| ------------------- | ---------------------------------------------------------------------------- | -------- | ---------------------- | :------: |
30+
| aws\_region | AWS region. | `string` | `"eu-west-1"` | no |
31+
| environment | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runners-default"` | no |
32+
| gitlab\_url | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no |
33+
| registration\_token | n/a | `any` | n/a | yes |
34+
| runner\_name | Name of the runner, will be used in the runner config.toml | `string` | `"default-auto"` | no |
35+
| timezone | Name of the timezone that the runner will be used in. | `string` | `"Europe/Amsterdam"` | no |
3636

3737
## Outputs
3838

Diff for: examples/runner-default/_docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This examples shows:
1111
- A multiline pre build script
1212
- A single line post build script
1313

14-
![runners-default](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-default.png)
14+
![runners-default](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-default.png)
1515

1616

1717
## Prerequisite

Diff for: examples/runner-docker/README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In this scenario the runner agent is running on a single EC2 node and runners are created by [docker machine](https://docs.gitlab.com/runner/configuration/autoscale.html) using spot instances. Runners will scale automatically based on configuration. The module creates by default a S3 cache that is shared cross runners (spot instances).
44

5-
![runners-default](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-default.png)
5+
![runners-default](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-default.png)
66

77
This examples shows:
88

@@ -15,7 +15,7 @@ This examples shows:
1515

1616
In this scenario the docker executor is used to schedule the builds. Builds will run on the same EC2 instance as the agent. No auto scaling is supported.
1717

18-
![runners-docker](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-docker.png)
18+
![runners-docker](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-docker.png)
1919

2020
## Prerequisite
2121

@@ -24,18 +24,18 @@ The terraform version is managed using [tfenv](https://github.com/Zordrak/tfenv)
2424
## Providers
2525

2626
| Name | Version |
27-
|------|---------|
28-
| aws | 2.56 |
27+
| ---- | ------- |
28+
| aws | 2.56 |
2929

3030
## Inputs
3131

32-
| Name | Description | Type | Default | Required |
33-
|------|-------------|------|---------|:-----:|
34-
| aws\_region | AWS region. | `string` | `"eu-west-1"` | no |
35-
| environment | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runners-docker"` | no |
36-
| gitlab\_url | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no |
37-
| registration\_token | n/a | `any` | n/a | yes |
38-
| runner\_name | Name of the runner, will be used in the runner config.toml | `string` | `"docker"` | no |
32+
| Name | Description | Type | Default | Required |
33+
| ------------------- | ---------------------------------------------------------------------------- | -------- | ---------------------- | :------: |
34+
| aws\_region | AWS region. | `string` | `"eu-west-1"` | no |
35+
| environment | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runners-docker"` | no |
36+
| gitlab\_url | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no |
37+
| registration\_token | n/a | `any` | n/a | yes |
38+
| runner\_name | Name of the runner, will be used in the runner config.toml | `string` | `"docker"` | no |
3939

4040
## Outputs
4141

Diff for: examples/runner-docker/_docs/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In this scenario the runner agent is running on a single EC2 node and runners are created by [docker machine](https://docs.gitlab.com/runner/configuration/autoscale.html) using spot instances. Runners will scale automatically based on configuration. The module creates by default a S3 cache that is shared cross runners (spot instances).
44

5-
![runners-default](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-default.png)
5+
![runners-default](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-default.png)
66

77
This examples shows:
88
- Usages of public / private subnets.
@@ -14,7 +14,7 @@ This examples shows:
1414

1515
In this scenario the docker executor is used to schedule the builds. Builds will run on the same EC2 instance as the agent. No auto scaling is supported.
1616

17-
![runners-docker](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-docker.png)
17+
![runners-docker](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-docker.png)
1818

1919

2020
## Prerequisite

Diff for: examples/runner-public/README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In this scenario the multiple runner agents can be created with different configuration by instantiating the module multiple times. Runners will scale automatically based on configuration. The S3 cache can be shared cross runners by managing the cache outside the module.
44

5-
![runners-cache](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-cache.png)
5+
![runners-cache](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-cache.png)
66

77
This examples shows:
88

@@ -19,22 +19,22 @@ The Terraform version is managed using [tfenv](https://github.com/Zordrak/tfenv)
1919

2020
## Providers
2121

22-
| Name | Version |
23-
|------|---------|
24-
| aws | 2.56 |
25-
| local | 1.4 |
26-
| null | 2.1.2 |
27-
| tls | 2.1.1 |
22+
| Name | Version |
23+
| ----- | ------- |
24+
| aws | 2.56 |
25+
| local | 1.4 |
26+
| null | 2.1.2 |
27+
| tls | 2.1.1 |
2828

2929
## Inputs
3030

31-
| Name | Description | Type | Default | Required |
32-
|------|-------------|------|---------|:-----:|
33-
| aws\_region | AWS region. | `string` | `"eu-west-1"` | no |
34-
| environment | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runner-public"` | no |
35-
| gitlab\_url | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no |
36-
| registration\_token | n/a | `any` | n/a | yes |
37-
| runner\_name | Name of the runner, will be used in the runner config.toml | `string` | `"public-auto"` | no |
31+
| Name | Description | Type | Default | Required |
32+
| ------------------- | ---------------------------------------------------------------------------- | -------- | ---------------------- | :------: |
33+
| aws\_region | AWS region. | `string` | `"eu-west-1"` | no |
34+
| environment | A name that identifies the environment, will used as prefix and for tagging. | `string` | `"runner-public"` | no |
35+
| gitlab\_url | URL of the gitlab instance to connect to. | `string` | `"https://gitlab.com"` | no |
36+
| registration\_token | n/a | `any` | n/a | yes |
37+
| runner\_name | Name of the runner, will be used in the runner config.toml | `string` | `"public-auto"` | no |
3838

3939
## Outputs
4040

Diff for: examples/runner-public/_docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In this scenario the multiple runner agents can be created with different configuration by instantiating the module multiple times. Runners will scale automatically based on configuration. The S3 cache can be shared cross runners by managing the cache outside the module.
44

5-
![runners-cache](https://github.com/npalm/assets/raw/master/images/terraform-aws-gitlab-runner/runner-cache.png)
5+
![runners-cache](https://github.com/npalm/assets/raw/main/images/terraform-aws-gitlab-runner/runner-cache.png)
66

77
This examples shows:
88
- Usages of public subnets.

0 commit comments

Comments
 (0)