terraform-linters / tflint

A Pluggable Terraform Linter
Mozilla Public License 2.0
4.86k stars 354 forks source link

GCP and Azure plugin maintainers wanted #606

Closed wata727 closed 3 years ago

wata727 commented 4 years ago

Hi folks πŸ‘‹

An experimental plugin system has been released in TFLint v0.14. This is the first step towards a "pluggable" linter for TFLint to support various Terraform providers in the future.

First, I'm going to work to cut out the AWS rules built into TFLint into a plugin. At the same time, we want to start supporting the other major clouds.

Unfortunately, I don't have much knowledge of GCP and Azure. So we are looking for a new plugin maintainer who is familiar with these clouds. If you are interested, please leave a comment. Thanks!

cimnine commented 4 years ago

Perhaps we could start an issue to collect rules for other cloud providers, where everyone could participate without internal knowledge of tflint.

For example, I would suggest the following rule for Azure:

_The name property of an azurerm_dns_txt_record resource should always be lower case. Azure will downcase the name automatically anyway. Yet this auto-downcase by Azure causes the Azure provider to replace the resource the next time that terraform runs, because it wants to ensure that the resource's name has 'correct casing'. But name property can't be changed, so the resource will be destroyed and then re-created. The consequence is that the resource will be re-created every time that terraform runs._

I believe that if users of tflint would start collecting such knowledge it would lower the bar for interested parties to kick-off the respective plugin, even if these people do not have intimate knowledge about all the gotchas of the respective cloud themselves already.

Because otherwise only someone with intimate knowledge of the respective cloud provider and with knowledge about go/tflint could even kick-off plugin development. No doubt, that would be ideal, but it seems to me that this would be a very high entry bar.

wata727 commented 4 years ago

Hi @cimnine, thank you for your great suggestion.

Your opinion makes sense. I have created ruleset plugin repositories for these providers to solve the concerns. https://github.com/terraform-linters/tflint-ruleset-google https://github.com/terraform-linters/tflint-ruleset-azurerm

I hope to gather feedback from users with provider-specific knowledge here. If you would help, please open an issue. Thank you again!

wata727 commented 4 years ago

tflint-ruleset-azurerm v0.1.0 has been released πŸŽ‰ https://github.com/terraform-linters/tflint-ruleset-azurerm/releases/tag/v0.1.0

wyardley commented 4 years ago

Can’t commit to maintaining a GCP plugin, but since you mentioned autogeneration, wanted to mention that https://github.com/GoogleCloudPlatform/magic-modules exists, and is what the GCP terraform providers are mostly generated off of

wata727 commented 3 years ago

tflint-ruleset-google v0.1.0 has been released πŸŽ‰ https://github.com/terraform-linters/tflint-ruleset-google/releases/tag/v0.1.0

The initial releases of both providers have been achieved, so this issue will be closed. I'm still looking for maintainers, so if you are interested, please open an issue in each repository.

brucearctor commented 3 years ago

@wata727 -- not sure whhat you need from a 'matinainer' but... noticing a lack of a contribution guide for tflint-ruleset-google, and a short list of things that are tested. Pretty sure you're open to PRs - but writing here first to check :-) Are there bounds on what you are seeking (I see the list of proposal here: https://github.com/terraform-linters/tflint-ruleset-google/issues )?