Skip to content

Commit 17ba6fd

Browse files
committedAug 13, 2023
dev: resolve all tflint issues
1 parent cd51c7f commit 17ba6fd

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed
 

‎.devcontainer/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ RUN SYSTEM_ARCH=$(dpkg --print-architecture) \
1919
&& terraform version \
2020
&& rm terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip
2121

22+
# install tflint
23+
RUN curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
24+
2225
# install docker
2326
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
2427

‎.devcontainer/devcontainer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Terraform",
33
"dockerFile": "Dockerfile",
44
"features": {
5-
"ghcr.io/devcontainers/features/docker-in-docker:2.0.1": {},
5+
"ghcr.io/devcontainers/features/docker-in-docker:2.3.0": {}
66
},
77
"mounts": [
88
"source=${localEnv:HOME}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached"
@@ -37,8 +37,8 @@
3737
"hashicorp.terraform",
3838
"ms-azuretools.vscode-docker",
3939
"tsandall.opa",
40-
"VisualStudioExptTeam.vscodeintellicode",
41-
],
40+
"VisualStudioExptTeam.vscodeintellicode"
41+
]
4242
}
43-
},
43+
}
4444
}

‎Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ clean:
2222
@find . -type d -name ".tfstate" -exec rm -rf {} +
2323
@find . -type d -name ".tfstate.backup" -exec rm -rf {} +
2424
@touch .devcontainer/.terraform.d/.gitkeep || true
25+
26+
lint:
27+
@tflint

‎main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ locals {
44
auth_service_enabled = local.enabled && var.auth_service_config.enabled
55
urlrewrite_service_enabled = local.enabled && var.urlrewrite_service_config.enabled
66

7-
aws_account_id = try(coalesce(var.aws_account_id, data.aws_caller_identity.current[0].account_id), "")
7+
aws_account_id = try(coalesce(var.aws_account_id, data.aws_caller_identity.current[0].account_id), "") # tflint-ignore: terraform_unused_declarations
88
aws_region_name = try(coalesce(var.aws_region_name, data.aws_region.current[0].name), "")
99

1010
service_config = {

‎version.tf

+4
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ terraform {
1010
source = "kreuzwerker/docker"
1111
version = ">= 3.0.0, < 4.0.0"
1212
}
13+
random = {
14+
source = "hashicorp/random"
15+
version = ">= 3.5.1"
16+
}
1317
}
1418
}

0 commit comments

Comments
 (0)
Please sign in to comment.