Skip to content

Commit f432406

Browse files
chore: run tflint in ci (#7)
1 parent ca9b3fe commit f432406

File tree

10 files changed

+37
-5
lines changed

10 files changed

+37
-5
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,41 @@ on:
99
- main
1010

1111
jobs:
12-
Lint:
12+
lint-tf:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17+
1718
- name: Set tool versions
1819
uses: wistia/parse-tool-versions@v1.0
20+
with:
21+
prefix: TOOL_VERSION_
22+
1923
- name: Setup Terraform
2024
uses: hashicorp/setup-terraform@v3
2125
with:
22-
terraform_version: ${{ env.TERRAFORM_TOOL_VERSION }}
26+
terraform_version: ${{ env.TOOL_VERSION_TERRAFORM }}
27+
2328
- name: Check formatting
2429
run: |
2530
terraform fmt -recursive -check
31+
32+
- name: Setup TFLint
33+
uses: terraform-linters/setup-tflint@v4
34+
with:
35+
tflint_version: ${{ env.TOOL_VERSION_TFLINT }}
36+
37+
- name: Run TFLint
38+
run: |
39+
tflint -f compact --recursive
40+
41+
lint-docs:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
2647
- name: Check documentation
2748
uses: terraform-docs/gh-actions@v1.4.1
2849
with:

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
terraform 1.11.3
2+
tflint 0.56.0

access/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ AWS account.
88

99
| Name | Version |
1010
|------|---------|
11+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.11.3 |
1112
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | 5.94.0 |
1213

1314
## Providers
@@ -56,7 +57,7 @@ No modules.
5657
| <a name="input_execution_extra_roles"></a> [execution\_extra\_roles](#input\_execution\_extra\_roles) | Additional roles to grant to Stacklet for policies execution.<br/><br/>If provided, this must be a map from the role name (which gets the prefix<br/>prepended) and a list of permissions to grant to the role in addition to the<br/>default read-only permissions. | `map(list(string))` | `{}` | no |
5758
| <a name="input_iam_path"></a> [iam\_path](#input\_iam\_path) | A path for IAM created IAM roles. If set, it must include leading and trailing slashes | `string` | `"/"` | no |
5859
| <a name="input_iam_region"></a> [iam\_region](#input\_iam\_region) | Region where IAM resouces should be created. If you don't use us-east-1, set this to a region you do use. | `string` | `"us-east-1"` | no |
59-
| <a name="input_prefix"></a> [prefix](#input\_prefix) | An arbitrary prefix pretended to names of created resources | `any` | n/a | yes |
60+
| <a name="input_prefix"></a> [prefix](#input\_prefix) | An arbitrary prefix pretended to names of created resources | `string` | n/a | yes |
6061
| <a name="input_stacklet_assetdb_role_arn"></a> [stacklet\_assetdb\_role\_arn](#input\_stacklet\_assetdb\_role\_arn) | ARN for the role used by AssetDB - Provided by Stacklet | `string` | n/a | yes |
6162
| <a name="input_stacklet_event_bus_arn"></a> [stacklet\_event\_bus\_arn](#input\_stacklet\_event\_bus\_arn) | ARN for event bus used for event forwarding - Provided by Stacklet | `string` | n/a | yes |
6263
| <a name="input_stacklet_execution_role_arn"></a> [stacklet\_execution\_role\_arn](#input\_stacklet\_execution\_role\_arn) | ARN for the role used by policies Execution - Provided by Stacklet | `string` | n/a | yes |

access/provder.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ terraform {
55
version = "5.94.0"
66
}
77
}
8+
9+
required_version = "~> 1.11.3"
810
}

access/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ variable "stacklet_external_id" {
2020

2121
variable "prefix" {
2222
description = "An arbitrary prefix pretended to names of created resources"
23+
type = string
2324
}
2425

2526
variable "iam_path" {

atlantis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ projects:
99
name: .dummy
1010
dir: .dummy
1111
workflow: dev
12-
terraform_version: v1.10.1
12+
terraform_version: v1.11.3
1313
autoplan:
1414
when_modified:
1515
- "*.tf*"

atlantis/dev/access-backend.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ terraform {
55
region = "us-east-2"
66
profile = "Test-Runner"
77
}
8+
9+
required_version = "~> 1.11.3"
810
}

org-read/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This modules adds an IAM role to allow Stacklet to discovery accounts in the org
1010

1111
| Name | Version |
1212
|------|---------|
13+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.11.3 |
1314
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | 5.94.0 |
1415

1516
## Providers
@@ -38,7 +39,7 @@ No modules.
3839
| Name | Description | Type | Default | Required |
3940
|------|-------------|------|---------|:--------:|
4041
| <a name="input_iam_path"></a> [iam\_path](#input\_iam\_path) | A path for IAM created IAM roles. If set, it must include leading and trailing slashes | `string` | `"/"` | no |
41-
| <a name="input_prefix"></a> [prefix](#input\_prefix) | An arbitrary prefix pretended to names of created resources | `any` | n/a | yes |
42+
| <a name="input_prefix"></a> [prefix](#input\_prefix) | An arbitrary prefix pretended to names of created resources | `string` | n/a | yes |
4243
| <a name="input_stacklet_assetdb_role_arn"></a> [stacklet\_assetdb\_role\_arn](#input\_stacklet\_assetdb\_role\_arn) | ARN for the role used by AssetDB - Provided by Stacklet | `string` | n/a | yes |
4344
| <a name="input_stacklet_external_id"></a> [stacklet\_external\_id](#input\_stacklet\_external\_id) | ID of the Stacklet delpoyment to restrict what can assume the roles - Provided by Stacklet | `string` | n/a | yes |
4445
| <a name="input_stacklet_platform_role_arn"></a> [stacklet\_platform\_role\_arn](#input\_stacklet\_platform\_role\_arn) | ARN for the role used by Platform - Provided by Stacklet | `string` | n/a | yes |

org-read/provder.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ terraform {
55
version = "5.94.0"
66
}
77
}
8+
9+
required_version = "~> 1.11.3"
810
}

org-read/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ variable "stacklet_external_id" {
1515

1616
variable "prefix" {
1717
description = "An arbitrary prefix pretended to names of created resources"
18+
type = string
1819
}
1920

2021
variable "iam_path" {

0 commit comments

Comments
 (0)