Skip to content

Commit

Permalink
fix: Update workflows and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
13archit committed Aug 11, 2023
1 parent f59fbc3 commit 95144e7
Show file tree
Hide file tree
Showing 14 changed files with 220 additions and 197 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Auto Assign PRs

on:
pull_request:
types: [opened, reopened]

workflow_dispatch:
jobs:
assignee:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@master
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
assignees: 'clouddrove-ci'
23 changes: 11 additions & 12 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2.3.4
uses: actions/checkout@master

- name: Set up Python 3.7.
uses: actions/setup-python@v2
- name: 'Set up Python 3.7'
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/github-actions@v9.0.2'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB}}'
github_token: '${{ secrets.GITHUB }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: pre-commit check errors
uses: pre-commit/action@v2.0.0
- name: 'pre-commit check errors'
uses: pre-commit/action@v3.0.0
continue-on-error: true

- name: pre-commit fix erros
uses: pre-commit/action@v2.0.0
- name: 'pre-commit fix erros'
uses: pre-commit/action@v3.0.0
continue-on-error: true

- name: 'push readme'
Expand All @@ -40,7 +39,7 @@ jobs:
with:
actions_subcommand: 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
Expand All @@ -51,4 +50,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()
if: always()
84 changes: 0 additions & 84 deletions .github/workflows/terraform.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/terratest.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
basic:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_example/complete/'
complete:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_example/external_key/'
15 changes: 15 additions & 0 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
basic:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_example/basic/'
complete:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_example/complete/'
16 changes: 10 additions & 6 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: tfsec
permissions: write-all
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tfsec:
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
secrets: inherit
basic:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: '.'
working_directory: './_example/complete/'
complete:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_example/external_key/'
12 changes: 3 additions & 9 deletions _example/example.tf → _example/complete/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,14 @@ provider "aws" {
## AWS Key Management Service (AWS KMS) is a managed service that makes it easy for you to create and control the cryptographic keys that are used to protect your data.
####----------------------------------------------------------------------------------
module "kms_key" {

source = "./../"

name = "kms"
environment = "test"
label_order = ["name", "environment"]

source = "./../../"
name = "kms"
environment = "test"
deletion_window_in_days = 7
alias = "alias/cloudtrail_Name"
kms_key_enabled = true
multi_region = true
create_external_enabled = true
valid_to = "2023-11-21T23:20:50Z"
key_material_base64 = "Wblj06fduthWggmsT0cLVoIMOkeLbc2kVfMud77i/JY="
policy = data.aws_iam_policy_document.default.json
}

Expand Down
File renamed without changes.
Loading

0 comments on commit 95144e7

Please sign in to comment.