-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathconfig.go
More file actions
93 lines (89 loc) · 2.59 KB
/
config.go
File metadata and controls
93 lines (89 loc) · 2.59 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// 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/oci/provider"
)
var Config = plugin.Provider{
Name: "oci",
ID: "go.mondoo.com/cnquery/v9/providers/oci",
Version: "13.0.4",
ConnectionTypes: []string{provider.ConnectionType},
Connectors: []plugin.Connector{
{
Name: "oci",
Use: "oci",
Short: "an Oracle Cloud Infrastructure tenancy",
Long: `Use the oci provider to query resources in an Oracle Cloud Infrastructure tenancy, including compute instances, networks, storage, and identity resources.
Examples:
cnspec shell oci --tenancy <tenancy_ocid> --user <user_ocid> --region <region> --key-path <path_to_private_key> --fingerprint <key_fingerprint>
cnspec scan oci --tenancy <tenancy_ocid> --user <user_ocid> --region <region> --key-path <path_to_private_key> --fingerprint <key_fingerprint>
cnspec shell oci --profile MYPROFILE
cnspec shell oci --config-file /path/to/config --profile MYPROFILE
`,
Discovery: []string{},
Flags: []plugin.Flag{
{
Long: "tenancy",
Type: plugin.FlagType_String,
Default: "",
Desc: "The tenancy's OCID",
},
{
Long: "user",
Type: plugin.FlagType_String,
Default: "",
Desc: "The user's OCID",
},
{
Long: "region",
Type: plugin.FlagType_String,
Default: "",
Desc: "The OCI region to connect to (e.g., us-ashburn-1)",
},
{
Long: "key-path",
Type: plugin.FlagType_String,
Default: "",
Desc: "Path to the private key file for API key authentication",
},
{
Long: "fingerprint",
Type: plugin.FlagType_String,
Default: "",
Desc: "The fingerprint of the private key",
},
{
Long: "key-secret",
Type: plugin.FlagType_String,
Default: "",
Desc: "Passphrase for the private key file, if encrypted",
},
{
Long: "profile",
Type: plugin.FlagType_String,
Default: "",
Desc: "OCI config profile name (e.g., DEFAULT)",
},
{
Long: "config-file",
Type: plugin.FlagType_String,
Default: "",
Desc: "Path to OCI config file (default: ~/.oci/config)",
},
},
},
},
AssetUrlTrees: []*inventory.AssetUrlBranch{
{
PathSegments: []string{"technology=oci"},
Key: "kind",
Title: "Kind",
Values: map[string]*inventory.AssetUrlBranch{
"tenancy": nil,
},
},
},
}