Skip to content

Commit 07dff9b

Browse files
committed
Migrate from terraform-aws-network
0 parents  commit 07dff9b

40 files changed

+1977
-0
lines changed

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Top-most EditorConfig file
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_style = space
8+
indent_size = 2
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
max_line_length = 100
12+
13+
[*.{tf,tfvars}]
14+
indent_size = 2
15+
indent_style = space
16+
17+
[*.md]
18+
max_line_length = 0
19+
20+
[COMMIT_EDITMSG]
21+
max_line_length = 0

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @posquit0

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/labeler.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Modules
2+
":floppy_disk: ipam":
3+
- modules/ipam/**/*
4+
5+
":floppy_disk: ipam-resource-discovery":
6+
- modules/ipam-resource-discovery/**/*
7+
8+
":floppy_disk: prefix-list":
9+
- modules/prefix-list/**/*

.github/labels.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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 ipam module."
45+
name: ":floppy_disk: ipam"
46+
- color: "fbca04"
47+
description: "This issue or pull request is related to ipam-resource-discovery module."
48+
name: ":floppy_disk: ipam-resource-discovery"
49+
- color: "fbca04"
50+
description: "This issue or pull request is related to prefix-list module."
51+
name: ":floppy_disk: prefix-list"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
steps:
11+
- name: Add Labels for PR
12+
uses: actions/labeler@v4
13+
with:
14+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
15+
configuration-path: .github/labeler.yaml
16+
sync-labels: true
17+
18+
- name: Add PR Size Labels for PR
19+
uses: codelytv/pr-size-labeler@v1
20+
with:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
xs_label: 'size/XS'
23+
xs_max_size: '20'
24+
s_label: 'size/S'
25+
s_max_size: '50'
26+
m_label: 'size/M'
27+
m_max_size: '150'
28+
l_label: 'size/L'
29+
l_max_size: '300'
30+
xl_label: 'size/XL'
31+
fail_if_xl: 'false'
32+
message_if_xl: >
33+
'This PR has too many changes.
34+
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@v3
18+
19+
- name: Sync labels
20+
uses: crazy-max/ghaction-github-labeler@v4
21+
with:
22+
github-token: ${{ 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@v3
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Get Changed Files
33+
id: changed-files
34+
uses: tj-actions/changed-files@v36
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@v36
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 }}

.github/workflows/welcome.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Welcome for First Issue or Pull Request
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
issues:
8+
types:
9+
- opened
10+
11+
jobs:
12+
welcome:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Welcome for First Issue or Pull Request
17+
uses: actions/first-interaction@v1
18+
with:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
issue-message: |
21+
### :wave: Welcome! Looks like this is your first issue.
22+
23+
Hey, thanks for your contribution! Please give us a bit of time to review it. 😄
24+
25+
**Be sure to follow the issue template!**
26+
pr-message: |
27+
### :wave: Welcome! Looks like this is your first pull request.
28+
29+
Hey, thanks for your contribution! Please give us a bit of time to review it. 😄
30+
31+
**Please check out our contributing guidelines.**
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@v3
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Get Changed Files
31+
id: changed-files
32+
uses: tj-actions/changed-files@v36
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)