-
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.
- Loading branch information
1 parent
7514c68
commit b397bff
Showing
2 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
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:0.13.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 -var "region=${AWS_REGION}" -var "vpc_id=vpc-123456" -var "subnets=[\"subnet-12345a\"]" -var "workers_ami_id=ami-123456" -var "cluster_ingress_cidrs=[]" -var "cluster_name=test_cluster" |
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 | ||
} | ||
} | ||
|