fix(terraform): Improve module triggers (#3113)

Have updated which extentions trigger the terraform module, to remove
the `hcl` since this gives false positives as it is used by other
Hashicorp products and add the `tfstate` and `tfplan` which are more
accurate indicators.
This commit is contained in:
Thomas O'Donnell 2021-10-04 18:08:58 +02:00 committed by GitHub
parent ec0206f50d
commit e74f428615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -2929,7 +2929,7 @@ If you still want to enable it, [follow the example shown below](#with-terraform
By default the module will be shown if any of the following conditions are met:
- The current directory contains a `.terraform` folder
- Current directory contains a file with the `.tf` or `.hcl` extensions
- Current directory contains a file with the `.tf`, `.tfplan` or `.tfstate` extensions
### Options
@ -2937,8 +2937,8 @@ By default the module will be shown if any of the following conditions are met:
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
| `format` | `"via [$symbol$workspace]($style) "` | The format string for the module. |
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
| `detect_extensions` | `["tf", "hcl"]` | Which extensions should trigger this module. |
| `symbol` | `"💠"` | A format string shown before the terraform workspace. |
| `detect_extensions` | `["tf", "tfplan", "tfstate"]` | Which extensions should trigger this module. |
| `detect_files` | `[]` | Which filenames should trigger this module. |
| `detect_folders` | `[".terraform"]` | Which folders should trigger this module. |
| `style` | `"bold 105"` | The style for the module. |

View File

@ -23,7 +23,7 @@ impl<'a> Default for TerraformConfig<'a> {
symbol: "💠 ",
style: "bold 105",
disabled: false,
detect_extensions: vec!["tf", "hcl"],
detect_extensions: vec!["tf", "tfplan", "tfstate"],
detect_files: vec![],
detect_folders: vec![".terraform"],
}