Adding custom rules for terraform project analyses


I have integrated my Terraform project with sonarqube.

Actually I tested a standard rule such as :

resource “aws_s3_bucket” “mynoncompliantbucket” { # Sensitive
bucket = “mynoncompliantbucketname”
acl = “public-read-write”

It worked very well. I would like as the next step to create my own custom rule for terraform analysis. Is it possible via adding plugin etc?

A quick look at the documentation suggested that adding custom rules to terraform is not supported.

Thank you

Hey there.

Adding custom rules to Terraform is not supported, other than importing issues generated by another engine as Generic Issues.

You’re also welcome to Suggest a new rule so that many people can benefit from your idea/work.