Skip to content

Commit 4ce52f4

Browse files
committed
chore: bumping the version of the module and updateing the makefile
1 parent 8919b57 commit 4ce52f4

File tree

3 files changed

+64
-22
lines changed

3 files changed

+64
-22
lines changed

Makefile

+62-20
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,20 @@ all:
3131
documentation:
3232
@echo "--> Generating documentation"
3333
@terraform-docs markdown table --output-file ${PWD}/README.md --output-mode inject .
34+
$(MAKE) documentation-modules
3435
$(MAKE) documentation-examples
3536

37+
documentation-modules:
38+
@echo "--> Generating documentation for modules"
39+
@if [ -d modules ]; then \
40+
find modules -type d -mindepth 1 -maxdepth 1 -exec terraform-docs markdown table --output-file README.md --output-mode inject {} \; ; \
41+
fi
42+
3643
documentation-examples:
3744
@echo "--> Generating documentation examples"
38-
@find examples -type d -mindepth 1 -maxdepth 1 -exec terraform-docs markdown table --output-file README.md --output-mode inject {} \;
45+
@if [ -d examples ]; then \
46+
find examples -type d -mindepth 1 -maxdepth 1 -exec terraform-docs markdown table --output-file README.md --output-mode inject {} \; ; \
47+
fi
3948

4049
init:
4150
@echo "--> Running terraform init"
@@ -44,47 +53,80 @@ init:
4453
security:
4554
@echo "--> Running Security checks"
4655
@tfsec .
56+
$(MAKE) security-modules
4757
$(MAKE) security-examples
4858

59+
security-modules:
60+
@echo "--> Running Security checks on modules"
61+
@if [ -d modules ]; then \
62+
find modules -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \
63+
echo "--> Validating $$dir"; \
64+
tfsec $$dir; \
65+
done; \
66+
fi
67+
4968
security-examples:
5069
@echo "--> Running Security checks on examples"
51-
@find examples -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \
52-
echo "--> Validating $$dir"; \
53-
tfsec $$dir; \
54-
done
55-
56-
validate-all:
57-
@echo "--> Running all validation checks"
58-
$(MAKE) validate
59-
$(MAKE) validate-examples
70+
@if [ -d examples ]; then \
71+
find examples -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \
72+
echo "--> Validating $$dir"; \
73+
tfsec $$dir; \
74+
done; \
75+
fi
6076

6177
validate:
6278
@echo "--> Running terraform validate"
6379
@terraform init -backend=false
6480
@terraform validate
81+
$(MAKE) validate-modules
6582
$(MAKE) validate-examples
6683

84+
validate-modules:
85+
@echo "--> Running terraform validate on modules"
86+
@if [ -d modules ]; then \
87+
find modules -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \
88+
echo "--> Validating $$dir"; \
89+
terraform -chdir=$$dir init -backend=false; \
90+
terraform -chdir=$$dir validate; \
91+
done; \
92+
fi
93+
6794
validate-examples:
6895
@echo "--> Running terraform validate on examples"
69-
@find examples -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \
70-
echo "--> Validating $$dir"; \
71-
terraform -chdir=$$dir init -backend=false; \
72-
terraform -chdir=$$dir validate; \
73-
done
96+
@if [ -d examples ]; then \
97+
find examples -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \
98+
echo "--> Validating $$dir"; \
99+
terraform -chdir=$$dir init -backend=false; \
100+
terraform -chdir=$$dir validate; \
101+
done; \
102+
fi
74103

75104
lint:
76105
@echo "--> Running tflint"
77106
@tflint --init
78107
@tflint -f compact
108+
$(MAKE) lint-modules
79109
$(MAKE) lint-examples
80110

111+
lint-modules:
112+
@echo "--> Running tflint on modules"
113+
@if [ -d modules ]; then \
114+
find modules -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \
115+
echo "--> Linting $$dir"; \
116+
tflint --chdir=$$dir --init; \
117+
tflint --chdir=$$dir -f compact; \
118+
done; \
119+
fi
120+
81121
lint-examples:
82122
@echo "--> Running tflint on examples"
83-
@find examples -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \
84-
echo "--> Linting $$dir"; \
85-
tflint --chdir=$$dir --init; \
86-
tflint --chdir=$$dir -f compact; \
87-
done
123+
@if [ -d examples ]; then \
124+
find examples -type d -mindepth 1 -maxdepth 1 | while read -r dir; do \
125+
echo "--> Linting $$dir"; \
126+
tflint --chdir=$$dir --init; \
127+
tflint --chdir=$$dir -f compact; \
128+
done; \
129+
fi
88130

89131
format:
90132
@echo "--> Running terraform fmt"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The `terraform-docs` utility is used to generate this README. Follow the below s
5555

5656
| Name | Source | Version |
5757
|------|--------|---------|
58-
| <a name="module_notifications"></a> [notifications](#module\_notifications) | appvia/notifications/aws | 0.1.3 |
58+
| <a name="module_notifications"></a> [notifications](#module\_notifications) | appvia/notifications/aws | 0.1.4 |
5959

6060
## Resources
6161

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
## Provision the SNS topic for the cost anomaly detection, if required
33
module "notifications" {
44
source = "appvia/notifications/aws"
5-
version = "0.1.3"
5+
version = "0.1.4"
66

77
allowed_aws_services = ["budgets.amazonaws.com", "lambda.amazonaws.com"]
88
create_sns_topic = var.create_sns_topic

0 commit comments

Comments
 (0)