Skip to content

Commit c528f49

Browse files
authored
Added CI workflow checks for pre-commit (#12)
1 parent 31f1dcf commit c528f49

File tree

5 files changed

+35
-22
lines changed

5 files changed

+35
-22
lines changed

.pre-commit-config.yaml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@ repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
33
rev: v1.77.0
44
hooks:
5-
- id: terraform_fmt
6-
- id: terraform_tflint
7-
- id: terraform_validate
5+
- id: terraform_fmt
6+
- id: terraform_tflint
7+
- id: terraform_validate
88
- repo: https://github.com/pre-commit/pre-commit-hooks
99
rev: v4.4.0
1010
hooks:
11-
- id: check-case-conflict
12-
- id: check-merge-conflict
13-
- id: check-vcs-permalinks
14-
- id: check-yaml
15-
- id: end-of-file-fixer
16-
- id: trailing-whitespace
11+
- id: check-added-large-files
12+
- id: check-byte-order-marker
13+
- id: check-case-conflict
14+
- id: check-executables-have-shebangs
15+
- id: check-merge-conflict
16+
- id: check-vcs-permalinks
17+
- id: check-yaml
18+
- id: detect-aws-credentials
19+
args: [--allow-missing-credentials]
20+
- id: detect-private-key
21+
- id: end-of-file-fixer
22+
- id: mixed-line-ending
23+
- id: trailing-whitespace

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ module "gitlab_oidc" {
2323
2424
attach_read_only_policy = true
2525
gitlab_organisation = "saidsef"
26-
gitlab_repositories = [{ name = "terraform-aws-gitlab-oidc", branches = ["main", "pr-*", "*pull*", "*"] }]
26+
gitlab_repositories = [{
27+
name = "terraform-aws-gitlab-oidc",
28+
branches = ["main", "pr-*", "*pull*", "*"]
29+
}]
2730
tags = var.tags
2831
}
2932
```

TERRAFORM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ No modules.
5454

5555
| Name | Description |
5656
|------|-------------|
57-
| <a name="output_repository"></a> [repository](#output\_repository) | GitLab repository and branches |
57+
| <a name="output_repositories"></a> [repositories](#output\_repositories) | List of GitLab repositories and branches |
5858
| <a name="output_role_arn"></a> [role\_arn](#output\_role\_arn) | AWS IAM role ARN |
5959
| <a name="output_role_id"></a> [role\_id](#output\_role\_id) | AWS IAM role ID |
60-
| <a name="output_thumbprint"></a> [thumbprint](#output\_thumbprint) | GitLab certificates thumbprint |
60+
| <a name="output_thumbprint"></a> [thumbprint](#output\_thumbprint) | GitLab certificates thumbprints |

exmaples/remote/main.tf

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ module "gitlab_oidc" {
66
source = "saidsef/gitlab-oidc/aws"
77
version = ">= 1"
88

9-
attach_admin_policy = true
10-
attach_read_only_policy = true
11-
create_oidc_provider = true
12-
enabled = true
13-
force_detach_policies = false
14-
gitlab_organisation = "saidsef"
15-
gitlab_repositories = [{ name = "terraform-aws-gitlab-oidc", branches = ["main", "pr-*", "*pull*", "*"] }]
9+
attach_admin_policy = true
10+
attach_read_only_policy = true
11+
create_oidc_provider = true
12+
enabled = true
13+
force_detach_policies = false
14+
gitlab_organisation = "saidsef"
15+
gitlab_repositories = [{
16+
name = "terraform-aws-gitlab-oidc",
17+
branches = ["main", "pr-*", "*pull*", "*"]
18+
}]
1619
iam_role_name = "gitlab-runner"
1720
iam_role_path = "/"
1821
iam_role_permissions_boundary = ""

outputs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ output "role_arn" {
1010
description = "AWS IAM role ARN"
1111
}
1212

13-
output "repository" {
13+
output "repositories" {
1414
value = local.repositories_branches
1515
sensitive = false
16-
description = "GitLab repository and branches"
16+
description = "List of GitLab repositories and branches"
1717
}
1818

1919
output "thumbprint" {
2020
value = [for fingerprint in data.tls_certificate.provider.certificates : fingerprint.sha1_fingerprint]
2121
sensitive = false
22-
description = "GitLab certificates thumbprint"
22+
description = "GitLab certificates thumbprints"
2323
}

0 commit comments

Comments
 (0)