-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from DNXLabs/feature/pipelines
Add pipelines
- Loading branch information
Showing
11 changed files
with
148 additions
and
35 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Generate terraform docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
|
||
- name: Render terraform docs inside the README.md and push changes back to pushed branch | ||
uses: DNXLabs/[email protected] | ||
with: | ||
tf_docs_working_dir: . | ||
tf_docs_output_file: README.md | ||
tf_docs_output_method: inject | ||
tf_docs_git_push: "true" | ||
tf_docs_git_commit_message: "terraform-docs: automated update action" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Lint | ||
|
||
on: [push] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
tflint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: TFLint | ||
uses: docker://wata727/tflint | ||
|
||
fmt: | ||
name: Code Format | ||
runs-on: ubuntu-latest | ||
container: | ||
image: hashicorp/terraform:latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- run: terraform fmt --recursive -check=true | ||
|
||
validate: | ||
name: Validate | ||
runs-on: ubuntu-latest | ||
container: | ||
image: hashicorp/terraform:latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Validate Code | ||
env: | ||
AWS_REGION: "us-east-1" | ||
TF_WARN_OUTPUT_ERRORS: 1 | ||
TF_VAR_vpc_id: "vpc-123456" | ||
TF_VAR_subnets: '["subnet-12345a"]' | ||
TF_VAR_workers_ami_id: "ami-123456" | ||
TF_VAR_cluster_name: "test_cluster" | ||
run: | | ||
terraform init | ||
terraform validate | ||
- name: Validate Examples | ||
run: | | ||
for example in $(find examples -maxdepth 1 -mindepth 1 -type d); do | ||
cd $example | ||
terraform init | ||
terraform validate | ||
cd - | ||
done | ||
minimum: | ||
name: Minimum version check | ||
runs-on: ubuntu-latest | ||
container: | ||
image: hashicorp/terraform:1.0.0 | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Validate Code | ||
env: | ||
AWS_REGION: "us-east-1" | ||
TF_WARN_OUTPUT_ERRORS: 1 | ||
run: | | ||
sed -i -e 's/>=/=/' -e 's/ \(\d\+\.\d\+\)"/ \1.0"/' _versions.tf | ||
terraform init | ||
terraform validate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Scan | ||
|
||
on: [push] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
scan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Run Checkov action | ||
id: checkov | ||
uses: bridgecrewio/checkov-action@v12 | ||
with: | ||
directory: . | ||
framework: terraform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
data "aws_caller_identity" "current" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,47 @@ | ||
variable "enabled" { | ||
description = "The boolean flag whether this module is enabled or not. No resources are created when set to false." | ||
type = bool | ||
default = true | ||
} | ||
|
||
variable "lambda_name" { | ||
description = "The name of the lambda which will be notified with a custom message when any alarm is performed." | ||
type = string | ||
default = "lambda_alarm_notification" | ||
} | ||
|
||
variable "cloudtrail_log_group_name" { | ||
description = "The name of the loggroup that will get information from" | ||
type = string | ||
} | ||
|
||
variable "lambda_timeout" { | ||
description = "Set lambda Timeout" | ||
default = 3 | ||
type = number | ||
default = 3 | ||
} | ||
|
||
variable "sns_topic_name" { | ||
description = "The name of the SNS Topic which will be notified when any alarm is performed." | ||
type = string | ||
default = "CISAlarmV2" | ||
} | ||
} | ||
|
||
variable "alarm_account_ids" { | ||
default = [] | ||
type = list(string) | ||
} | ||
|
||
variable "alarm_mode" { | ||
default = "light" | ||
type = string | ||
description = "Version of alarms to use. 'light' or 'full' available" | ||
} | ||
|
||
variable "tags" { | ||
description = "Specifies object tags key and value. This applies to all resources created by this module." | ||
type = map(string) | ||
default = { | ||
"Terraform" = true | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters