Skip to content

Commit 753f9f3

Browse files
committed
fix: issues terraform module
1 parent fdd7682 commit 753f9f3

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

shared-files/devcontainers/terraform-module/devcontainer.json

+2-11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"remoteUser": "vscode",
2121
"containerUser": "vscode",
2222
"containerEnv": {
23+
"CLOUDAVENUE_VDC_VALIDATION": "false",
2324
"HOME": "/home/vscode",
2425
// Username
2526
"CLOUDAVENUE_USER": "${localEnv:CLOUDAVENUE_USER}",
@@ -30,17 +31,7 @@
3031
// Netbackup user
3132
"NETBACKUP_USER": "${localEnv:NETBACKUP_USER}",
3233
// Netbackup password
33-
"NETBACKUP_PASSWORD": "${localEnv:NETBACKUP_PASSWORD}",
34-
// HTTP_PROXY
35-
"HTTP_PROXY": "${localEnv:HTTP_PROXY}",
36-
// HTTPS_PROXY
37-
"HTTPS_PROXY": "${localEnv:HTTPS_PROXY}",
38-
// NO_PROXY
39-
"NO_PROXY": "${localEnv:NO_PROXY}",
40-
// http_proxy
41-
"http_proxy": "${localEnv:HTTP_PROXY}",
42-
// https_proxy
43-
"https_proxy": "${localEnv:HTTPS_PROXY}"
34+
"NETBACKUP_PASSWORD": "${localEnv:NETBACKUP_PASSWORD}"
4435
},
4536
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
4637
"workspaceFolder": "/workspace"

shared-files/license/licenserc.yaml.njk

+3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ header: # `header` section is configurations for source codes license header.
7474
- "examples/"
7575
- ".taskfiles/"
7676
- "Taskfile.yml"
77+
- ".teraform-docs.yml"
78+
- ".tflint.yml"
79+
7780

7881
comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`.
7982

shared-files/taskfile/libraries/terraform.yml

+20-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ tasks:
1717
silent: true
1818
cmds:
1919
- defer: "echo ✅ Terraform are initialized"
20+
- cmd: terraform init
21+
- cmd: tflint --init
2022

2123
# * Install
2224
install:
@@ -42,7 +44,7 @@ tasks:
4244
internal: true
4345
cmds:
4446
- for: [
45-
tflint,
47+
terraform-docs,
4648
]
4749
task: internal:tools:brew:optional
4850
vars:
@@ -55,6 +57,7 @@ tasks:
5557
cmds:
5658
- for: [
5759
tf:fmt,
60+
tf:vaildate,
5861
tflint,
5962
]
6063
task: lint:{{.ITEM}}
@@ -78,6 +81,15 @@ tasks:
7881
cmds:
7982
- find {{.DIRECTORY}} -name "*.tf" -exec terraform fmt {} \;
8083

84+
lint:tf:vaildate:
85+
desc: Run terraform validate
86+
internal: true
87+
preconditions:
88+
- sh: command -v terraform
89+
msg: "terraform is not installed. Please run `task install`"
90+
cmds:
91+
- terraform validate
92+
8193
# * Lint with tflint
8294
lint:tflint:
8395
desc: Run tflint
@@ -88,4 +100,10 @@ tasks:
88100
- sh: test -f .tflint.hcl
89101
msg: "No .tflint.hcl file found."
90102
cmds:
91-
- tflint
103+
- tflint --module
104+
105+
# * Actions
106+
actions:docs:
107+
desc: Generate terraform docs
108+
cmds:
109+
- terraform-docs markdown . > README.md

0 commit comments

Comments
 (0)