Skip to content

Commit 3bd38ff

Browse files
committed
feat: migrate from terraform-aws-domain
1 parent 8b46dd3 commit 3bd38ff

26 files changed

+1475
-0
lines changed

.github/labeler.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Modules
2+
":floppy_disk: amazon-issued-cert":
3+
- changed-files:
4+
- any-glob-to-any-file:
5+
- modules/amazon-issued-cert/**/*
6+
7+
":floppy_disk: cidr-collection":
8+
- changed-files:
9+
- any-glob-to-any-file:
10+
- modules/cidr-collection/**/*
11+
12+
":floppy_disk: imported-cert":
13+
- changed-files:
14+
- any-glob-to-any-file:
15+
- modules/imported-cert/**/*
16+
17+
":floppy_disk: private-ca-issued-cert":
18+
- changed-files:
19+
- any-glob-to-any-file:
20+
- modules/private-ca-issued-cert/**/*
21+
22+
":floppy_disk: private-zone":
23+
- changed-files:
24+
- any-glob-to-any-file:
25+
- modules/private-zone/**/*
26+
27+
":floppy_disk: public-zone":
28+
- changed-files:
29+
- any-glob-to-any-file:
30+
- modules/public-zone/**/*
31+
32+
":floppy_disk: record-set":
33+
- changed-files:
34+
- any-glob-to-any-file:
35+
- modules/record-set/**/*
36+
37+
":floppy_disk: registered-domain":
38+
- changed-files:
39+
- any-glob-to-any-file:
40+
- modules/registered-domain/**/*
41+
42+
":floppy_disk: resolver-inbound-endpoint":
43+
- changed-files:
44+
- any-glob-to-any-file:
45+
- modules/resolver-inbound-endpoint/**/*
46+
47+
":floppy_disk: resolver-query-logging":
48+
- changed-files:
49+
- any-glob-to-any-file:
50+
- modules/resolver-query-logging/**/*

.github/labels.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Warning
2+
- color: "ee0701"
3+
description: "Categorize bug reports."
4+
name: ":warning: bug"
5+
- color: "ee0701"
6+
description: "Categorize vulnerability reports."
7+
name: ":warning: vulnerability"
8+
9+
# Highlight
10+
- color: "0e8a16"
11+
description: "Good for newcomers."
12+
name: ":fire: good first issue"
13+
- color: "0e8a16"
14+
description: "Extra attention is needed."
15+
name: ":fire: help wanted"
16+
17+
# Cancel
18+
- color: "b60205"
19+
description: "This issue or pull request already exists."
20+
name: ":pray: duplicate"
21+
- color: "b60205"
22+
description: "This will not be worked on."
23+
name: ":pray: wontfix"
24+
25+
# Size
26+
- color: "cfd3d7"
27+
description: "Extra Small size issue or PR."
28+
name: "size/XS"
29+
- color: "cfd3d7"
30+
description: "Small size issue or PR."
31+
name: "size/S"
32+
- color: "cfd3d7"
33+
description: "Medium size issue or PR."
34+
name: "size/M"
35+
- color: "cfd3d7"
36+
description: "Large size issue or PR."
37+
name: "size/L"
38+
- color: "cfd3d7"
39+
description: "Extra Large size issue or PR."
40+
name: "size/XL"
41+
42+
# Modules
43+
- color: "fbca04"
44+
description: "This issue or pull request is related to amazon-issued-cert module."
45+
name: ":floppy_disk: amazon-issued-cert"
46+
- color: "fbca04"
47+
description: "This issue or pull request is related to cidr-collection module."
48+
name: ":floppy_disk: cidr-collection"
49+
- color: "fbca04"
50+
description: "This issue or pull request is related to imported-cert module."
51+
name: ":floppy_disk: imported-cert"
52+
- color: "fbca04"
53+
description: "This issue or pull request is related to private-ca-issued-cert module."
54+
name: ":floppy_disk: private-ca-issued-cert"
55+
- color: "fbca04"
56+
description: "This issue or pull request is related to private-zone module."
57+
name: ":floppy_disk: private-zone"
58+
- color: "fbca04"
59+
description: "This issue or pull request is related to public-zone module."
60+
name: ":floppy_disk: public-zone"
61+
- color: "fbca04"
62+
description: "This issue or pull request is related to record-set module."
63+
name: ":floppy_disk: record-set"
64+
- color: "fbca04"
65+
description: "This issue or pull request is related to registered-domain module."
66+
name: ":floppy_disk: registered-domain"
67+
- color: "fbca04"
68+
description: "This issue or pull request is related to resolver-inbound-endpoint module."
69+
name: ":floppy_disk: resolver-inbound-endpoint"
70+
- color: "fbca04"
71+
description: "This issue or pull request is related to resolver-query-logging module."
72+
name: ":floppy_disk: resolver-query-logging"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Label Pull Requests
2+
3+
on:
4+
- pull_request_target
5+
6+
jobs:
7+
label-pr:
8+
runs-on: ubuntu-latest
9+
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
14+
steps:
15+
- name: Add Labels for PR
16+
uses: actions/labeler@v5
17+
with:
18+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
19+
configuration-path: .github/labeler.yaml
20+
dot: true
21+
sync-labels: true
22+
23+
- name: Add PR Size Labels for PR
24+
uses: codelytv/pr-size-labeler@v1
25+
with:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
xs_label: 'size/XS'
28+
xs_max_size: '20'
29+
s_label: 'size/S'
30+
s_max_size: '50'
31+
m_label: 'size/M'
32+
m_max_size: '150'
33+
l_label: 'size/L'
34+
l_max_size: '300'
35+
xl_label: 'size/XL'
36+
fail_if_xl: 'false'
37+
message_if_xl: >
38+
'This PR has too many changes.
39+
Please make sure you are NOT addressing multiple issues with one PR.'

.github/workflows/sync-labels.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Sync labels
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- .github/labels.yaml
9+
workflow_dispatch: {}
10+
11+
jobs:
12+
sync-labels:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Sync labels
20+
uses: crazy-max/ghaction-github-labeler@v5
21+
with:
22+
github-otken: ${{ secrets.GITHUB_TOKEN }}
23+
yaml-file: .github/labels.yaml
24+
skip-delete: false
25+
dry-run: false
26+
# exclude: |
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Integration (Terraform)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request: {}
8+
9+
concurrency:
10+
group: terraform-integration-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
changed:
15+
name: Filter Changed Files and Directories
16+
runs-on: ubuntu-latest
17+
18+
outputs:
19+
changed: ${{ steps.set-outputs.outputs.changed }}
20+
modified: ${{ steps.set-outputs.outputs.modified }}
21+
changed_files: ${{ steps.set-outputs.outputs.changed_files }}
22+
modified_files: ${{ steps.set-outputs.outputs.modified_files }}
23+
changed_directories: ${{ steps.set-outputs.outputs.changed_directories }}
24+
modified_directories: ${{ steps.set-outputs.outputs.modified_directories }}
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Get Changed Files
33+
id: changed-files
34+
uses: tj-actions/changed-files@v44
35+
with:
36+
files: |
37+
modules/**
38+
examples/**
39+
json: true
40+
41+
- name: Get Changed Directories
42+
id: changed-directories
43+
uses: tj-actions/changed-files@v44
44+
with:
45+
files: |
46+
modules/**
47+
examples/**
48+
dir_names: "true"
49+
dir_names_max_depth: 2
50+
json: true
51+
52+
- name: Set outputs
53+
id: set-outputs
54+
run: |
55+
echo "changed=${{ steps.changed-directories.outputs.any_changed }}" >> $GITHUB_OUTPUT
56+
echo "modified=${{ steps.changed-directories.outputs.any_modified }}" >> $GITHUB_OUTPUT
57+
58+
echo "changed_files=${{ steps.changed-files.outputs.all_changed_files }}" >> $GITHUB_OUTPUT
59+
echo "modified_files=${{ steps.changed-files.outputs.all_modified_files }}" >> $GITHUB_OUTPUT
60+
61+
echo "changed_directories=${{ steps.changed-directories.outputs.all_changed_files }}" >> $GITHUB_OUTPUT
62+
echo "modified_directories=${{ steps.changed-directories.outputs.all_modified_files }}" >> $GITHUB_OUTPUT
63+
64+
65+
terraform:
66+
name: Lint (terraform)
67+
needs:
68+
- changed
69+
if: ${{ needs.changed.outputs.modified == 'true' }}
70+
uses: tedilabs/.github/.github/workflows/terraform.terraform.yaml@main
71+
72+
strategy:
73+
matrix:
74+
path: ${{ fromJson(needs.changed.outputs.modified_directories) }}
75+
76+
with:
77+
terraform_target_dir: ${{ matrix.path }}
78+
terraform_version: latest
79+
terraform_host: app.terraform.io
80+
secrets:
81+
gh_token: ${{ secrets.GITHUB_TOKEN }}
82+
token: ${{ secrets.GITHUB_TOKEN }}
83+
terraform_token: ${{ secrets.TERRAFORM_TOKEN }}
84+
85+
86+
tflint:
87+
name: Lint (tflint)
88+
needs:
89+
- changed
90+
if: ${{ needs.changed.outputs.modified == 'true' }}
91+
uses: tedilabs/.github/.github/workflows/terraform.tflint.yaml@main
92+
93+
strategy:
94+
matrix:
95+
path: ${{ fromJson(needs.changed.outputs.modified_directories) }}
96+
97+
with:
98+
tflint_version: latest
99+
tflint_config_file: .tflint.hcl
100+
tflint_target_dir: ${{ matrix.path }}
101+
tflint_recursive_enabled: false
102+
tflint_terraform_init_enabled: true
103+
terraform_version: latest
104+
terraform_host: app.terraform.io
105+
secrets:
106+
gh_token: ${{ secrets.GITHUB_TOKEN }}
107+
token: ${{ secrets.GITHUB_TOKEN }}
108+
terraform_token: ${{ secrets.TERRAFORM_TOKEN }}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Integration (YAML)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request: {}
8+
9+
concurrency:
10+
group: yaml-integration-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
changed:
15+
name: Filter Changed Files and Directories
16+
runs-on: ubuntu-latest
17+
18+
outputs:
19+
changed: ${{ steps.set-outputs.outputs.changed }}
20+
modified: ${{ steps.set-outputs.outputs.modified }}
21+
changed_files: ${{ steps.set-outputs.outputs.changed_files }}
22+
modified_files: ${{ steps.set-outputs.outputs.modified_files }}
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Get Changed Files
31+
id: changed-files
32+
uses: tj-actions/changed-files@v44
33+
with:
34+
files: |
35+
**/*.yaml
36+
**/*.yml
37+
json: true
38+
39+
- name: Set outputs
40+
id: set-outputs
41+
run: |
42+
echo "changed=${{ steps.changed-files.outputs.any_changed }}" >> $GITHUB_OUTPUT
43+
echo "modified=${{ steps.changed-files.outputs.any_modified }}" >> $GITHUB_OUTPUT
44+
45+
echo "changed_files=${{ steps.changed-files.outputs.all_changed_files }}" >> $GITHUB_OUTPUT
46+
echo "modified_files=${{ steps.changed-files.outputs.all_modified_files }}" >> $GITHUB_OUTPUT
47+
48+
lint:
49+
name: Lint (yamllint)
50+
needs:
51+
- changed
52+
if: ${{ needs.changed.outputs.modified == 'true' }}
53+
uses: tedilabs/.github/.github/workflows/yaml.yamllint.yaml@main
54+
55+
with:
56+
yamllint_version: latest
57+
yamllint_config_file: .yamllint.yaml
58+
yamllint_target_dir: ./
59+
secrets:
60+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)