File tree Expand file tree Collapse file tree 4 files changed +669
-566
lines changed Expand file tree Collapse file tree 4 files changed +669
-566
lines changed Original file line number Diff line number Diff line change @@ -108,15 +108,15 @@ if they are present in `README.md`.
108
108
` ` ` yaml
109
109
hooks:
110
110
- id: terraform_tflint
111
- args: ['args=--deep']
111
+ args: ['-- args=--deep']
112
112
` ` `
113
113
114
114
In order to pass multiple args, try the following :
115
115
` ` ` yaml
116
116
- id: terraform_tflint
117
117
args:
118
- - 'args=--deep'
119
- - 'args=--enable-rule=terraform_documented_variables'
118
+ - '-- args=--deep'
119
+ - '-- args=--enable-rule=terraform_documented_variables'
120
120
` ` `
121
121
122
122
# # Notes about terraform_tfsec hooks
@@ -132,6 +132,41 @@ if they are present in `README.md`.
132
132
}
133
133
` ` `
134
134
135
+ # # Notes about terraform_validate hooks
136
+
137
+ 1. `terraform_validate` supports custom arguments so you can pass supported no-color or json flags.
138
+
139
+ 1. Example :
140
+ ` ` ` yaml
141
+ hooks:
142
+ - id: terraform_validate
143
+ args: ['--args=-json']
144
+ ` ` `
145
+
146
+ In order to pass multiple args, try the following :
147
+ ` ` ` yaml
148
+ - id: terraform_validate
149
+ args:
150
+ - '--args=-json'
151
+ - '--args=-no-color'
152
+ ` ` `
153
+ 1. `terraform_validate` also supports custom environment variables passed to the pre-commit runtime
154
+
155
+ 1. Example :
156
+ ` ` ` yaml
157
+ hooks:
158
+ - id: terraform_validate
159
+ args: ['--envs=AWS_DEFAULT_REGION="us-west-2"']
160
+ ` ` `
161
+
162
+ In order to pass multiple args, try the following :
163
+ ` ` ` yaml
164
+ - id: terraform_validate
165
+ args:
166
+ - '--envs=AWS_DEFAULT_REGION="us-west-2"'
167
+ - '--envs=AWS_ACCESS_KEY_ID="anaccesskey"'
168
+ - '--envs=AWS_SECRET_ACCESS_KEY="asecretkey"'
169
+ ` ` `
135
170
136
171
# # Notes for developers
137
172
You can’t perform that action at this time.
0 commit comments