Skip to content

Commit

Permalink
Merge pull request #3 from pregress/rename_template
Browse files Browse the repository at this point in the history
rename-template
  • Loading branch information
pregress authored Oct 31, 2024
2 parents 41ddf42 + 29fd3ef commit 7b608e3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# don't track built binary
/tflint-ruleset-template
/tflint-ruleset-azurerm-security
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ build:

install: build
mkdir -p ~/.tflint.d/plugins
mv ./tflint-ruleset-template ~/.tflint.d/plugins
mv ./tflint-ruleset-azurerm-security ~/.tflint.d/plugins
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# TFLint Ruleset Template
[![Build Status](https://github.com/terraform-linters/tflint-ruleset-template/workflows/build/badge.svg?branch=main)](https://github.com/terraform-linters/tflint-ruleset-template/actions)
# TFLint Ruleset AzureRm Security
[![build](https://github.com/pregress/tflint-ruleset-azurerm-securirty/actions/workflows/build.yml/badge.svg)](https://github.com/pregress/tflint-ruleset-azurerm-securirty/actions/workflows/build.yml)

This is a template repository for building a custom ruleset. You can create a plugin repository from "Use this template". See also [Writing Plugins](https://github.com/terraform-linters/tflint/blob/master/docs/developer-guide/plugins.md).
This is a repository for an azurerm tflint rule set to enforce security best practices.

## Requirements

Expand All @@ -10,16 +10,14 @@ This is a template repository for building a custom ruleset. You can create a pl

## Installation

TODO: This template repository does not contain release binaries, so this installation will not work. Please rewrite for your repository. See the "Building the plugin" section to get this template ruleset working.

You can install the plugin with `tflint --init`. Declare a config in `.tflint.hcl` as follows:

```hcl
plugin "template" {
enabled = true
version = "0.1.0"
source = "github.com/terraform-linters/tflint-ruleset-template"
source = "github.com/pregress/tflint-ruleset-azurerm-security"
signing_key = <<-KEY
-----BEGIN PGP PUBLIC KEY BLOCK-----
Expand All @@ -35,10 +33,7 @@ plugin "template" {

|Name|Description|Severity|Enabled|Link|
| --- | --- | --- | --- | --- |
|aws_instance_example_type|Example rule for accessing and evaluating top-level attributes|ERROR|||
|aws_s3_bucket_example_lifecycle_rule|Example rule for accessing top-level/nested blocks and attributes under the blocks|ERROR|||
|google_compute_ssl_policy|Example rule with a custom rule config|WARNING|||
|terraform_backend_type|Example rule for accessing other than resources|ERROR|||
|azurerm_storage_account_tls_version.go|Enforce TLS 1.2 on storage accounts |ERROR|||

## Building the plugin

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/terraform-linters/tflint-ruleset-template
module github.com/terraform-linters/tflint-ruleset-azurerm-security

go 1.22.5

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/terraform-linters/tflint-plugin-sdk/plugin"
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
"github.com/terraform-linters/tflint-ruleset-template/rules"
"github.com/terraform-linters/tflint-ruleset-azurerm-security/rules"
)

func main() {
Expand Down

0 comments on commit 7b608e3

Please sign in to comment.