Skip to content

Commit

Permalink
Feat: Updated the tfcheck workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolnagpal committed Aug 28, 2023
1 parent 0855cff commit 045b441
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_example/vpc'
working_directory: './_example/public'
10 changes: 5 additions & 5 deletions _example/public/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ module "sftp" {
s3_bucket_name = module.s3_bucket.id
endpoint_type = "PUBLIC"
workflow_details = {
on_upload = {
execution_role = "arn:aws:iam::1234567890:role/test-sftp-transfer-role"
workflow_id = "w-12345XXXX6da"
}
}
on_upload = {
execution_role = "arn:aws:iam::1234567890:role/test-sftp-transfer-role"
workflow_id = "w-12345XXXX6da"
}
}
}
18 changes: 9 additions & 9 deletions _example/vpc/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ module "subnets" {
module "security_group-sftp" {
source = "clouddrove/security-group/aws"
version = "2.0.0"
name = "sftp-sg"
environment = "test"
label_order = ["environment", "name"]
vpc_id = module.vpc.vpc_id
name = "sftp-sg"
environment = "test"
label_order = ["environment", "name"]
vpc_id = module.vpc.vpc_id
## INGRESS Rules
new_sg_ingress_rules_with_cidr_blocks = [{
rule_count = 1
Expand Down Expand Up @@ -104,7 +104,7 @@ module "s3_bucket" {
label_order = ["environment", "name"]

versioning = true
logging = true
logging = true
acl = "private"
force_destroy = true
}

Check warning

Code scanning / defsec

S3 Bucket does not have logging enabled. Warning

Bucket does not have logging enabled

Check warning

Code scanning / defsec

S3 Data should be versioned Warning

Bucket does not have versioning enabled
Expand All @@ -126,9 +126,9 @@ module "sftp" {
restricted_home = true
vpc_security_group_ids = [module.security_group-sftp.security_group_ids]
workflow_details = {
on_upload = {
execution_role = "arn:aws:iam::1234567890:role/test-sftp-transfer-role"
workflow_id = "w-12345XXXX6da"
}
on_upload = {
execution_role = "arn:aws:iam::1234567890:role/test-sftp-transfer-role"
workflow_id = "w-12345XXXX6da"
}
}
}
5 changes: 4 additions & 1 deletion _example/vpc/versions.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.0"

required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
version = ">= 5.9.0"
}
}
}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,6 @@ variable "workflow_details" {
}

variable "enable_workflow" {
type = bool
type = bool
default = false
}

0 comments on commit 045b441

Please sign in to comment.