diff --git a/.editorconfig b/.editorconfig index 3afc974..db7edc8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,13 +2,19 @@ # top-most EditorConfig file root = true +## Default settings [*] -# Unix-style newlines +### Unix-style newlines end_of_line = lf -# Always end with an empty new line +### Always end with an empty new line insert_final_newline = true -# Set default charset to utf-8 +### Set default charset to utf-8 charset = utf-8 -# Indent with 2 spaces +### Indent with 2 spaces indent_style = space indent_size = 2 + +## Markdown files +[*.md] +### Do not wrap long lines +max_line_length = off diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..c53f0fb --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,11 @@ +--- +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + - package-ecosystem: terraform + directory: "/" + schedule: + interval: daily diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 3de16aa..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: - -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - -- package-ecosystem: terraform - directory: "/" - schedule: - interval: daily diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml deleted file mode 100644 index ebb7098..0000000 --- a/.github/workflows/pr-checks.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Pull Request checks - -on: - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - -jobs: - terraform-fmt: - name: Terraform Formatting - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: setup terraform - uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 #v3.0.0 - - name: terraform fmt - run: terraform fmt -check -diff -recursive ./ - - terraform-validate: - name: Terraform config validation - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: setup terraform - uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 #v3.0.0 - - name: terraform init - run: terraform init - - name: terraform validate - run: terraform validate - - tflint: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: cache tflint - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 - with: - path: ~/.tflint.d/plugins - key: tflint-${{ hashFiles('.tflint.hcl') }} - - name: setup tflint - uses: terraform-linters/setup-tflint@19a52fbac37dacb22a09518e4ef6ee234f2d4987 # v4.0.0 - - name: tflint init - run: tflint --init - - name: tflint validate - run: tflint -f compact --module diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..43dee9a --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,22 @@ +--- +name: Pull Request checks + +"on": + pull_request: + branches: + - main + - master + types: + - opened + - reopened + - synchronize + - ready_for_review + +jobs: + check_shell: + uses: scaleway-terraform-modules/wokflows/.github/workflows/check_shell.yaml@6daf37405de395030ec647a50c4e1704628fda51 # v0.0.1 + check_tf: + uses: scaleway-terraform-modules/wokflows/.github/workflows/check_tf.yaml@6daf37405de395030ec647a50c4e1704628fda51 # v0.0.1 + secrets: inherit + check_yaml: + uses: scaleway-terraform-modules/wokflows/.github/workflows/check_yaml.yaml@6daf37405de395030ec647a50c4e1704628fda51 # v0.0.1 diff --git a/.gitignore b/.gitignore index 48ece5e..07ab2c1 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ override.tf.json # to change depending on the environment. *.tfvars *.tfvars.json + +# MacOS File +**/.DS_Store diff --git a/.terraform-docs.yaml b/.terraform-docs.yaml index aae6170..8358da8 100644 --- a/.terraform-docs.yaml +++ b/.terraform-docs.yaml @@ -1,3 +1,4 @@ +--- formatter: "markdown table" header-from: main.tf diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..ad0d7d1 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,34 @@ +--- +yaml-files: + - '*.yaml' + - '*.yml' + - '.yamllint' + +rules: + anchors: enable + braces: enable + brackets: enable + colons: enable + commas: enable + comments: + level: warning + comments-indentation: + level: warning + document-end: disable + document-start: + level: warning + empty-lines: enable + empty-values: disable + float-values: disable + hyphens: enable + indentation: enable + key-duplicates: enable + key-ordering: disable + line-length: disable + new-line-at-end-of-file: enable + new-lines: enable + octal-values: disable + quoted-strings: disable + trailing-spaces: enable + truthy: + level: warning