Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required tags rule #133

Closed
jtaylor100 opened this issue Sep 7, 2021 · 2 comments · Fixed by #194
Closed

Required tags rule #133

jtaylor100 opened this issue Sep 7, 2021 · 2 comments · Fixed by #194
Labels
enhancement New feature or request

Comments

@jtaylor100
Copy link

A feature request:

Something similar to what was stated in terraform-linters/tflint#150 and implemented in terraform-linters/tflint#617 but for Azure resources.

In the config, you should be able to specify a tags attribute in the config block:

config {
    tags = ["foo", "bar"]
}

All the Azure resources with tags supported would be checked for tags matching these keys and a lint fail would occur for resources without those tags.

@bendrucker bendrucker transferred this issue from terraform-linters/tflint Sep 7, 2021
@bendrucker bendrucker changed the title Check for tags on Azure resources Required tags rule Sep 7, 2021
@wata727 wata727 added the enhancement New feature or request label Oct 3, 2021
@wata727
Copy link
Member

wata727 commented Aug 30, 2022

@guybartal

As a Terraform developer I would like to be noticed when I missed required tags resources
so I won't forget to add those when I add new resources in Terraform module
adding this rule with help solve this issue: https://github.com/orgs/microsoft/projects/232

I think that such an issue should be solved by an approach like default_tags in AWS, but it seems a little difficult for Azure. hashicorp/terraform-provider-azurerm#13776
In the meantime, I don't think it's a bad idea to support such functionality in TFLint.

If you're interested in implementing such a rule, I would like to support it wherever possible.

@guybartal
Copy link
Contributor

already implemented that based on AWS rule :)
I'll soon open a PR, would appreciate if you will review and approve it @wata727.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

3 participants