Skip to content

Commit

Permalink
feat: added new github-action and updated versions
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolnagpal committed Sep 27, 2023
1 parent 3cc9bc0 commit 763d715
Show file tree
Hide file tree
Showing 26 changed files with 121 additions and 255 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These owners will be the default owners for everything in the repo.
* @anmolnagpal @clouddrove/approvers @clouddrove-ci
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## what
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
* Use bullet points to be concise and to the point.

## why
* Provide the justifications for the changes (e.g. business case).
* Describe why these changes were made (e.g. why do these commits fix the problem?)
* Use bullet points to be concise and to the point.

## references
* Link to any supporting jira issues or helpful documentation to add some context (e.g. stackoverflow).
* Use `closes #123`, if this PR closes a Jira issue `#123`
12 changes: 12 additions & 0 deletions .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Auto Assign PRs
on:
pull_request:
types: [opened, reopened]
workflow_dispatch:
jobs:
assignee:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@1.0.5
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
assignees: 'clouddrove-ci'
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
jobs:
changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@1.0.5
secrets: inherit
with:
branch: 'master'
branch: 'master'
17 changes: 8 additions & 9 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,34 @@ on:
push:
branches:
- master

jobs:
readme-create:
readme:
name: 'readme-create'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
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
uses: pre-commit/action@v3.0.0
continue-on-error: true

- name: 'pre-commit fix erros'
uses: pre-commit/action@v2.0.0
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 Down
85 changes: 0 additions & 85 deletions .github/workflows/terraform.yml

This file was deleted.

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

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tf-checks-anomaly-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.5
with:
working_directory: './_example/anomaly_example/'
tf-checks-basic-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.5
with:
working_directory: './_example/basic_example/'
tf-checks-expression-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.5
with:
working_directory: './_example/expression_example/'
11 changes: 11 additions & 0 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: tf-lint
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tf-lint:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@1.0.5
secrets:
GITHUB: ${{ secrets.GITHUB }}
4 changes: 2 additions & 2 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
tfsec:
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@1.0.5
secrets: inherit
with:
working_directory: '.'
working_directory: '.'
6 changes: 3 additions & 3 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ usage: |-
```hcl
module "alarm" {
source = "clouddrove/cloudwatch-alarms/aws"
version = "1.3.0"
version = "2.0.0"
name = "alarm"
environment = "test"
label_order = ["name", "environment"]
Expand Down Expand Up @@ -75,7 +75,7 @@ usage: |-
```hcl
module "alarm" {
source = "clouddrove/cloudwatch-alarms/aws"
version = "1.3.0"
version = "2.0.0"
name = "alarm"
environment = "test"
label_order = ["name", "environment"]
Expand Down Expand Up @@ -115,7 +115,7 @@ usage: |-
```hcl
module "alarm" {
source = "clouddrove/cloudwatch-alarms/aws"
version = "1.3.0"
version = "2.0.0"
name = "alarm"
environment = "test"
label_order = ["name", "environment"]
Expand Down
4 changes: 2 additions & 2 deletions _example/anomaly_example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module "vpc" {
##-----------------------------------------------------
module "public_subnets" {
source = "clouddrove/subnet/aws"
version = "1.3.0"
version = "2.0.0"

name = "public-subnet"
environment = "test"
Expand Down Expand Up @@ -76,7 +76,7 @@ module "ssh" {
##-----------------------------------------------------
module "ec2" {
source = "clouddrove/ec2/aws"
version = "1.3.0"
version = "2.0.0"

name = "alarm"
environment = "test"
Expand Down
2 changes: 1 addition & 1 deletion _example/anomaly_example/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
output "arn" {
value = module.alarm.*.arn
value = module.alarm[*].arn
description = "The ARN of the cloudwatch metric alarm."
}

Expand Down
11 changes: 11 additions & 0 deletions _example/anomaly_example/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.5"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.13.1"
}
}
}
4 changes: 2 additions & 2 deletions _example/basic_example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module "vpc" {
##-----------------------------------------------------
module "public_subnets" {
source = "clouddrove/subnet/aws"
version = "1.3.0"
version = "2.0.0"

name = "public-subnet"
environment = "test"
Expand Down Expand Up @@ -79,7 +79,7 @@ module "ssh" {
##-----------------------------------------------------
module "ec2" {
source = "clouddrove/ec2/aws"
version = "1.3.0"
version = "2.0.0"
name = "ec2-instance"
environment = "test"
label_order = ["name", "environment"]
Expand Down
2 changes: 1 addition & 1 deletion _example/basic_example/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
output "arn" {
value = module.alarm.*.arn
value = module.alarm[*].arn
description = "The ARN of the cloudwatch metric alarm."
}

Expand Down
11 changes: 11 additions & 0 deletions _example/basic_example/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.5"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.13.1"
}
}
}
4 changes: 2 additions & 2 deletions _example/expression_example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module "vpc" {
##-----------------------------------------------------
module "public_subnets" {
source = "clouddrove/subnet/aws"
version = "1.3.0"
version = "2.0.0"

name = "public-subnet"
environment = "test"
Expand Down Expand Up @@ -78,7 +78,7 @@ module "ssh" {
##-----------------------------------------------------
module "ec2" {
source = "clouddrove/ec2/aws"
version = "1.3.0"
version = "2.0.0"

name = "ec2-instance"
environment = "test"
Expand Down
2 changes: 1 addition & 1 deletion _example/expression_example/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
output "arn" {
value = module.alarm.*.arn
value = module.alarm[*].arn
description = "The ARN of the cloudwatch metric alarm."
}

Expand Down
Loading

0 comments on commit 763d715

Please sign in to comment.