-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathconfig.go
More file actions
66 lines (61 loc) · 1.79 KB
/
config.go
File metadata and controls
66 lines (61 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright Mondoo, Inc. 2024, 2026
// SPDX-License-Identifier: BUSL-1.1
package config
import (
"go.mondoo.com/mql/v13/providers-sdk/v1/inventory"
"go.mondoo.com/mql/v13/providers-sdk/v1/plugin"
"go.mondoo.com/mql/v13/providers/terraform/provider"
)
var Config = plugin.Provider{
Name: "terraform",
ID: "go.mondoo.com/cnquery/v9/providers/terraform",
Version: "13.0.4",
ConnectionTypes: []string{
provider.StateConnectionType,
provider.PlanConnectionType,
provider.HclConnectionType,
provider.HclGitConnectionType,
},
Connectors: []plugin.Connector{
{
Name: "terraform",
Aliases: []string{},
Use: "terraform PATH",
Short: "Terraform HCL configurations, plan files, and state files",
Long: `Use the terraform provider to query Terraform HCL, plan, or state files as well as directories of files.
Available commands:
plan Terraform plan file
state Terraform state file
Examples:
cnspec shell terraform <PATH-TO-HCL-DIRECTORY>
cnspec scan terraform <PATH-TO-HCL-FILE>
cnspec scan terraform plan <PATH-TO-PLAN-JSON>
cnspec scan terraform state <PATH-TO-STATE-JSON>
`,
MinArgs: 1,
MaxArgs: 2,
Discovery: []string{},
Flags: []plugin.Flag{
{
Long: "ignore-dot-terraform",
Type: plugin.FlagType_Bool,
Default: "false",
Desc: "Exclude the .terraform directory (contains cached provider plugins and modules)",
ConfigEntry: "ignore_dot_terraform",
},
},
},
},
AssetUrlTrees: []*inventory.AssetUrlBranch{
{
PathSegments: []string{"technology=iac", "category=terraform"},
Key: "kind",
Title: "Kind",
Values: map[string]*inventory.AssetUrlBranch{
"hcl": nil,
"plan": nil,
"state": nil,
},
},
},
}