Skip to content

Commit 04c81df

Browse files
committed
Fix tflint
1 parent 51553c2 commit 04c81df

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

.tflint.hcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
plugin "aws" {
22
enabled = true
3-
preset = "recommended"
3+
version = "0.33.0"
4+
source = "github.com/terraform-linters/tflint-ruleset-aws"
45
}

modules/ecs-task-role/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# - sends application logs to CloudWatch Logs
1111

1212
locals {
13-
s3_arns = compact(distinct(concat(var.writable_s3_arns, var.readable_s3_arns)))
14-
aws_ssm_managed_instance_core_arn = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
13+
s3_arns = compact(distinct(concat(var.writable_s3_arns, var.readable_s3_arns)))
14+
ssm_managed_instance_core_arn = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
1515
}
1616

1717
data "aws_iam_policy_document" "policy" {
@@ -117,7 +117,7 @@ module "this" {
117117
]
118118

119119
custom_role_policy_arns = compact([
120-
var.enable_ssm_core_policy ? locals.ssm_managed_instance_core_arn : "",
120+
var.enable_ssm_core_policy ? local.ssm_managed_instance_core_arn : "",
121121
module.policy.arn,
122122
])
123123

modules/execution-role/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,8 @@ No modules.
5151
| [aws_iam_role.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
5252
| [aws_iam_role_policy.custom](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
5353
| [aws_iam_role_policy_attachment.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
54-
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
5554
| [aws_iam_policy_document.assume_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
5655
| [aws_iam_policy_document.custom](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
57-
| [aws_partition.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source |
58-
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
5956

6057
## Inputs
6158

modules/execution-role/main.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@
33
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html
44
################################################################################
55

6-
data "aws_region" "current" {}
7-
data "aws_partition" "current" {}
8-
data "aws_caller_identity" "current" {}
9-
106
locals {
11-
account_id = data.aws_caller_identity.current.account_id
12-
partition = data.aws_partition.current.partition
13-
region = data.aws_region.current.name
147
name_prefix = "${trimsuffix(var.name)}-"
158

169
create_custom_policy = var.create && length(var.statements) > 0

0 commit comments

Comments
 (0)