Custom code for Terraform

Team, I want to create custom rules for Terraform. Using terraform we are creating resources on cloud. and we want SonarQube warn the user if two tags Owner and Application Name not define and null.