Skip to content

Commit

Permalink
feat(tflint): disable cross-resource rules (#108)
Browse files Browse the repository at this point in the history
* feat(tflint): disable cross-resource rules

* feat(tflint): disable SQS redrive policy rule
  • Loading branch information
nmoutschen authored Nov 1, 2021
1 parent 314b698 commit ca13a78
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/rules/lambda/async_failure_destination.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ When an asynchronous calls fail, they should be captured and retried whenever po
FunctionName: my-lambda-function
```

??? bug "Disabled for Terraform"

This rule is disabled for Terraform, as the current linter only support static values in expressions. See [this issue](https://github.com/awslabs/serverless-rules/issues/107) for more information.

## Implementations

=== "CDK"
Expand Down
4 changes: 4 additions & 0 deletions docs/rules/lambda/log_retention.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ By default, CloudWatch log groups created by Lambda functions have an unlimited
RetentionInDays: 7
```

??? bug "Disabled for Terraform"

This rule is disabled for Terraform, as the current linter only support static values in expressions. See [this issue](https://github.com/awslabs/serverless-rules/issues/107) for more information.

## Why is this a warning?

Since `serverless-rules` evaluate infrastructure-as-code template, it cannot check if you use a solution that will automatically change the configuration of log groups after the fact.
Expand Down
4 changes: 4 additions & 0 deletions docs/rules/sqs/redrive_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ __tflint__: aws_sqs_queue_redrive_policy

You can configure the redrive policy on an Amazon SQS queue. With a redrive policy, you can define how many times SQS will make the messages available for consumers. After that, SQS will send it to the dead-letter queue specified in the policy.

??? bug "Disabled for Terraform"

This rule is disabled for Terraform, as the current linter only support static values in expressions. See [this issue](https://github.com/awslabs/serverless-rules/issues/107) for more information.

## Implementations

=== "CDK"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (r *AwsCloudwatchLogGroupLambdaRetentionRule) Name() string {

// Enabled returns whether the rule is enabled by default
func (r *AwsCloudwatchLogGroupLambdaRetentionRule) Enabled() bool {
return true
return false
}

// Severity returns the rule severity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (r *AwsLambdaEventInvokeConfigAsyncOnFailureRule) Name() string {
// Enabled returns whether the rule is enabled by default
func (r *AwsLambdaEventInvokeConfigAsyncOnFailureRule) Enabled() bool {
// TODO: Determine whether the rule is enabled by default
return true
return false
}

// Severity returns the rule severity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (r *AwsSqsQueueRedrivePolicyRule) Name() string {

// Enabled returns whether the rule is enabled by default
func (r *AwsSqsQueueRedrivePolicyRule) Enabled() bool {
return true
return false
}

// Severity returns the rule severity
Expand Down

0 comments on commit ca13a78

Please sign in to comment.