Skip to content

Commit 9a7e34f

Browse files
authored
chore: upgrade terraform 1.12.0 and github provider 6.6.0 (#194)
* chore: upgrade terraform 1.12.0 and github provider 6.6.0 * feat: add support for efficient labels handling (#195)
1 parent ab89941 commit 9a7e34f

25 files changed

+242
-161
lines changed

.github/workflows/apply.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- name: Setup terraform
7070
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
7171
with:
72-
terraform_version: 1.2.9
72+
terraform_version: 1.12.0
7373
terraform_wrapper: false
7474
- name: Initialize terraform
7575
run: terraform init

.github/workflows/clean.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
- name: Setup terraform
7474
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
7575
with:
76-
terraform_version: 1.2.9
76+
terraform_version: 1.12.0
7777
terraform_wrapper: false
7878
- name: Initialize terraform
7979
run: terraform init -upgrade

.github/workflows/fix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
- name: Setup terraform
9696
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
9797
with:
98-
terraform_version: 1.2.9
98+
terraform_version: 1.12.0
9999
terraform_wrapper: false
100100
- name: Initialize terraform
101101
run: terraform init

.github/workflows/plan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
- name: Setup terraform
8383
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
8484
with:
85-
terraform_version: 1.2.9
85+
terraform_version: 1.12.0
8686
terraform_wrapper: false
8787
- name: Initialize terraform
8888
run: terraform init
@@ -124,7 +124,7 @@ jobs:
124124
- name: Setup terraform
125125
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
126126
with:
127-
terraform_version: 1.2.9
127+
terraform_version: 1.12.0
128128
terraform_wrapper: false
129129
- name: Initialize terraform
130130
run: terraform init

.github/workflows/sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Setup terraform
6868
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
6969
with:
70-
terraform_version: 1.2.9
70+
terraform_version: 1.12.0
7171
terraform_wrapper: false
7272
- name: Initialize terraform
7373
run: terraform init -upgrade

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- new args for repositories and branch protection rules
2424

2525
### Changed
26+
- **BREAKING**: added support for efficient labels handling via the `github_issue_labels` resource (please clean `github_issue_label.this.*` from the terraform state and update `locals_override.tf` and `resources_override.tf` before syncing)
27+
- **BREAKING**: upgraded to terraform 1.12.0 and github provider 6.6.0 (please clean `github_branch_protection.this.*` from the terraform state and update `resources_override.tf` before syncing the upgrade)
2628
- **BREAKING**: turned scripts into an ESM project (please ensure you remove the following files during the upgrade: `scripts/.eslintignore`, `scripts/.eslintrc.json`, `scripts/jest.config.js`, `jest.d.ts`, `jest.setup.ts`; please update your imports in the `scripts/src/actions/fix-yaml-config.ts` file to include the `.js` extension)
2729
- **BREAKING**: Updated the signatures of all the shared actions; now the runAction function will persist the changes to disk while action functions will operate on the in-memory state (please update your imports in the `scripts/src/actions/fix-yaml-config.ts` file accordingly)
2830
- Synchronization script: to use GitHub API directly instead of relying on TF GH Provider's Data Sources

docs/ABOUT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Running the `Sync` GitHub Action workflows refreshes the underlying terraform st
4747
- [github_team_repository](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository)
4848
- [github_team_membership](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_membership)
4949
- [github_repository_file](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file)
50-
- [github_issue_label](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/issue_label)
50+
- [github_issue_labels](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/issue_labels)
5151

5252
# Config Fix Rules
5353

docs/EXAMPLE.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ repositories: # This group defines repositories (https://registry.terraform.io/p
3232
require_conversation_resolution: false
3333
require_signed_commits: false
3434
required_linear_history: false
35-
push_restrictions: [] # This field accepts node IDs (TODO: make this field accept human friendly names too)
3635
required_pull_request_reviews:
3736
dismiss_stale_reviews: false
3837
dismissal_restrictions: [] # This field accepts node IDs (TODO: make this field accept human friendly names too)

github/.schema.json

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@
156156
"pages": {
157157
"additionalProperties": false,
158158
"properties": {
159+
"build_type": {
160+
"enum": [
161+
"legacy",
162+
"workflow"
163+
],
164+
"type": "string"
165+
},
159166
"cname": {
160167
"type": "string"
161168
},
@@ -225,6 +232,9 @@
225232
"template": {
226233
"additionalProperties": false,
227234
"properties": {
235+
"include_all_branches": {
236+
"type": "boolean"
237+
},
228238
"owner": {
229239
"type": "string"
230240
},
@@ -245,6 +255,9 @@
245255
},
246256
"vulnerability_alerts": {
247257
"type": "boolean"
258+
},
259+
"web_commit_signoff_required": {
260+
"type": "boolean"
248261
}
249262
},
250263
"type": "object"
@@ -309,21 +322,18 @@
309322
"allows_force_pushes": {
310323
"type": "boolean"
311324
},
312-
"blocks_creations": {
313-
"type": "boolean"
314-
},
315325
"enforce_admins": {
316326
"type": "boolean"
317327
},
318-
"lock_branch": {
319-
"type": "boolean"
320-
},
321-
"push_restrictions": {
328+
"force_push_bypassers": {
322329
"items": {
323330
"type": "string"
324331
},
325332
"type": "array"
326333
},
334+
"lock_branch": {
335+
"type": "boolean"
336+
},
327337
"require_conversation_resolution": {
328338
"type": "boolean"
329339
},
@@ -354,6 +364,9 @@
354364
"require_code_owner_reviews": {
355365
"type": "boolean"
356366
},
367+
"require_last_push_approval": {
368+
"type": "boolean"
369+
},
357370
"required_approving_review_count": {
358371
"type": "number"
359372
},
@@ -377,6 +390,21 @@
377390
}
378391
},
379392
"type": "object"
393+
},
394+
"restrict_pushes": {
395+
"additionalProperties": false,
396+
"properties": {
397+
"blocks_creations": {
398+
"type": "boolean"
399+
},
400+
"push_allowances": {
401+
"items": {
402+
"type": "string"
403+
},
404+
"type": "array"
405+
}
406+
},
407+
"type": "object"
380408
}
381409
},
382410
"type": "object"

scripts/__tests__/__resources__/terraform/locals_override.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ locals {
88
"github_team",
99
"github_branch_protection",
1010
"github_repository_file",
11-
"github_issue_label"
11+
"github_issue_labels"
1212
]
1313
ignore = {
1414
"repositories" = ["ignored"]

0 commit comments

Comments
 (0)