Skip to content

Commit

Permalink
🛑 remove v9 from ID of providers
Browse files Browse the repository at this point in the history
We don't want it in the ID, since they have a separate version info.
Having the ID in the name makes it much trickier to update a provider
(technically).
  • Loading branch information
arlimus committed Jan 12, 2024
1 parent 061256f commit d7ed6a1
Show file tree
Hide file tree
Showing 45 changed files with 68 additions and 90 deletions.
2 changes: 1 addition & 1 deletion providers/arista/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

var Config = plugin.Provider{
Name: "arista",
ID: "go.mondoo.com/cnquery/v9/providers/arista",
ID: "go.mondoo.com/cnquery/providers/arista",
Version: "9.1.15",
ConnectionTypes: []string{provider.ConnectionType},
Connectors: []plugin.Connector{
Expand Down
2 changes: 1 addition & 1 deletion providers/arista/resources/arista.lr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mondoo, Inc.
// SPDX-License-Identifier: BUSL-1.1

option provider = "go.mondoo.com/cnquery/v9/providers/arista"
option provider = "go.mondoo.com/cnquery/providers/arista"
option go_package = "go.mondoo.com/cnquery/v9/providers/arista/resources"

// Arista EOS resource
Expand Down
2 changes: 1 addition & 1 deletion providers/atlassian/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

var Config = plugin.Provider{
Name: "atlassian",
ID: "go.mondoo.com/cnquery/v9/providers/atlassian",
ID: "go.mondoo.com/cnquery/providers/atlassian",
Version: "9.1.15",
ConnectionTypes: []string{
provider.DefaultConnectionType,
Expand Down
2 changes: 1 addition & 1 deletion providers/aws/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

var Config = plugin.Provider{
Name: "aws",
ID: "go.mondoo.com/cnquery/v9/providers/aws",
ID: "go.mondoo.com/cnquery/providers/aws",
Version: "9.1.25",
ConnectionTypes: []string{provider.DefaultConnectionType, string(awsec2ebsconn.EBSConnectionType)},
Connectors: []plugin.Connector{
Expand Down
2 changes: 1 addition & 1 deletion providers/aws/resources/aws.lr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import "../../network/resources/network.lr"


option provider = "go.mondoo.com/cnquery/v9/providers/aws"
option provider = "go.mondoo.com/cnquery/providers/aws"
option go_package = "go.mondoo.com/cnquery/v9/providers/aws/resources"

// AWS resource
Expand Down
2 changes: 1 addition & 1 deletion providers/azure/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

var Config = plugin.Provider{
Name: "azure",
ID: "go.mondoo.com/cnquery/v9/providers/azure",
ID: "go.mondoo.com/cnquery/providers/azure",
Version: "9.2.1",
ConnectionTypes: []string{
provider.ConnectionType,
Expand Down
2 changes: 1 addition & 1 deletion providers/azure/resources/azure.lr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mondoo, Inc.
// SPDX-License-Identifier: BUSL-1.1

option provider = "go.mondoo.com/cnquery/v9/providers/azure"
option provider = "go.mondoo.com/cnquery/providers/azure"
option go_package = "go.mondoo.com/cnquery/v9/providers/azure/resources"

// Azure resource
Expand Down
2 changes: 1 addition & 1 deletion providers/core/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin"

var Config = plugin.Provider{
Name: "core",
ID: "go.mondoo.com/cnquery/v9/providers/core",
ID: "go.mondoo.com/cnquery/providers/core",
Version: "9.1.8",
Connectors: []plugin.Connector{},
}
2 changes: 1 addition & 1 deletion providers/core/resources/core.lr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mondoo, Inc.
// SPDX-License-Identifier: BUSL-1.1

option provider = "go.mondoo.com/cnquery/v9/providers/core"
option provider = "go.mondoo.com/cnquery/providers/core"
option go_package = "go.mondoo.com/cnquery/v9/providers/core/resources"

// Contextual information about MQL runtime and environment
Expand Down
64 changes: 21 additions & 43 deletions providers/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ import "go.mondoo.com/cnquery/v9/providers-sdk/v1/plugin"
// to tell users what providers are used for common connections, when there
// is no other way to find out.
var DefaultProviders Providers = map[string]*Provider{

"arista": {
Provider: &plugin.Provider{
Name: "arista",
ID: "go.mondoo.com/cnquery/v9/providers/arista",
ID: "go.mondoo.com/cnquery/providers/arista",
ConnectionTypes: []string{"arista"},
Connectors: []plugin.Connector{

{
Name: "arista",
Use: "arista user@host",
Expand All @@ -34,7 +32,6 @@ var DefaultProviders Providers = map[string]*Provider{
ID: "go.mondoo.com/cnquery/providers/atlassian",
ConnectionTypes: []string{"atlassian", "jira", "admin", "confluence", "scim"},
Connectors: []plugin.Connector{

{
Name: "atlassian",
Use: "atlassian",
Expand All @@ -47,10 +44,9 @@ var DefaultProviders Providers = map[string]*Provider{
"aws": {
Provider: &plugin.Provider{
Name: "aws",
ID: "go.mondoo.com/cnquery/v9/providers/aws",
ID: "go.mondoo.com/cnquery/providers/aws",
ConnectionTypes: []string{"aws", "ebs"},
Connectors: []plugin.Connector{

{
Name: "aws",
Use: "aws",
Expand All @@ -63,10 +59,9 @@ var DefaultProviders Providers = map[string]*Provider{
"azure": {
Provider: &plugin.Provider{
Name: "azure",
ID: "go.mondoo.com/cnquery/v9/providers/azure",
ID: "go.mondoo.com/cnquery/providers/azure",
ConnectionTypes: []string{"azure"},
Connectors: []plugin.Connector{

{
Name: "azure",
Use: "azure",
Expand All @@ -79,7 +74,7 @@ var DefaultProviders Providers = map[string]*Provider{
"core": {
Provider: &plugin.Provider{
Name: "core",
ID: "go.mondoo.com/cnquery/v9/providers/core",
ID: "go.mondoo.com/cnquery/providers/core",
ConnectionTypes: []string(nil),
Connectors: []plugin.Connector{},
},
Expand All @@ -88,10 +83,9 @@ var DefaultProviders Providers = map[string]*Provider{
"equinix": {
Provider: &plugin.Provider{
Name: "equinix",
ID: "go.mondoo.com/cnquery/v9/providers/equinix",
ID: "go.mondoo.com/cnquery/providers/equinix",
ConnectionTypes: []string{"equinix"},
Connectors: []plugin.Connector{

{
Name: "equinix",
Use: "equinix [org <org id>] [project <project-id>] [--token <token>]",
Expand All @@ -104,10 +98,9 @@ var DefaultProviders Providers = map[string]*Provider{
"gcp": {
Provider: &plugin.Provider{
Name: "gcp",
ID: "go.mondoo.com/cnquery/v9/providers/gcp",
ID: "go.mondoo.com/cnquery/providers/gcp",
ConnectionTypes: []string{"gcp", "gcp-snapshot"},
Connectors: []plugin.Connector{

{
Name: "gcp",
Use: "gcp",
Expand All @@ -120,10 +113,9 @@ var DefaultProviders Providers = map[string]*Provider{
"github": {
Provider: &plugin.Provider{
Name: "github",
ID: "go.mondoo.com/cnquery/v9/providers/github",
ID: "go.mondoo.com/cnquery/providers/github",
ConnectionTypes: []string{"github"},
Connectors: []plugin.Connector{

{
Name: "github",
Use: "github",
Expand All @@ -136,10 +128,9 @@ var DefaultProviders Providers = map[string]*Provider{
"gitlab": {
Provider: &plugin.Provider{
Name: "gitlab",
ID: "go.mondoo.com/cnquery/v9/providers/gitlab",
ID: "go.mondoo.com/cnquery/providers/gitlab",
ConnectionTypes: []string{"gitlab", "gitlab-group", "gitlab-project"},
Connectors: []plugin.Connector{

{
Name: "gitlab",
Use: "gitlab",
Expand All @@ -152,10 +143,9 @@ var DefaultProviders Providers = map[string]*Provider{
"google-workspace": {
Provider: &plugin.Provider{
Name: "google-workspace",
ID: "go.mondoo.com/cnquery/v9/providers/google-workspace",
ID: "go.mondoo.com/cnquery/providers/google-workspace",
ConnectionTypes: []string{"google-workspace"},
Connectors: []plugin.Connector{

{
Name: "google-workspace",
Use: "google-workspace [--credentials-path <credentials-path>] [--customer-id <customer-id>] [--impersonated-user-email <impersonated-user-email>]",
Expand All @@ -168,10 +158,9 @@ var DefaultProviders Providers = map[string]*Provider{
"ipmi": {
Provider: &plugin.Provider{
Name: "ipmi",
ID: "go.mondoo.com/cnquery/v9/providers/ipmi",
ID: "go.mondoo.com/cnquery/providers/ipmi",
ConnectionTypes: []string{"ipmi"},
Connectors: []plugin.Connector{

{
Name: "ipmi",
Use: "ipmi user@host",
Expand All @@ -184,10 +173,9 @@ var DefaultProviders Providers = map[string]*Provider{
"k8s": {
Provider: &plugin.Provider{
Name: "k8s",
ID: "go.mondoo.com/cnquery/v9/providers/k8s",
ID: "go.mondoo.com/cnquery/providers/k8s",
ConnectionTypes: []string{"k8s"},
Connectors: []plugin.Connector{

{
Name: "k8s",
Use: "k8s (optional MANIFEST path)",
Expand All @@ -200,10 +188,9 @@ var DefaultProviders Providers = map[string]*Provider{
"ms365": {
Provider: &plugin.Provider{
Name: "ms365",
ID: "go.mondoo.com/cnquery/v9/providers/ms365",
ID: "go.mondoo.com/cnquery/providers/ms365",
ConnectionTypes: []string{"ms365"},
Connectors: []plugin.Connector{

{
Name: "ms365",
Use: "ms365",
Expand All @@ -216,10 +203,9 @@ var DefaultProviders Providers = map[string]*Provider{
"network": {
Provider: &plugin.Provider{
Name: "network",
ID: "go.mondoo.com/cnquery/v9/providers/network",
ID: "go.mondoo.com/cnquery/providers/network",
ConnectionTypes: []string{"host"},
Connectors: []plugin.Connector{

{
Name: "host",
Use: "host HOST",
Expand All @@ -232,10 +218,9 @@ var DefaultProviders Providers = map[string]*Provider{
"oci": {
Provider: &plugin.Provider{
Name: "oci",
ID: "go.mondoo.com/cnquery/v9/providers/oci",
ID: "go.mondoo.com/cnquery/providers/oci",
ConnectionTypes: []string{"oci"},
Connectors: []plugin.Connector{

{
Name: "oci",
Use: "oci",
Expand All @@ -248,10 +233,9 @@ var DefaultProviders Providers = map[string]*Provider{
"okta": {
Provider: &plugin.Provider{
Name: "okta",
ID: "go.mondoo.com/cnquery/v9/providers/okta",
ID: "go.mondoo.com/cnquery/providers/okta",
ConnectionTypes: []string{"okta"},
Connectors: []plugin.Connector{

{
Name: "okta",
Use: "okta",
Expand All @@ -264,10 +248,9 @@ var DefaultProviders Providers = map[string]*Provider{
"opcua": {
Provider: &plugin.Provider{
Name: "opcua",
ID: "go.mondoo.com/cnquery/v9/providers/opcua",
ID: "go.mondoo.com/cnquery/providers/opcua",
ConnectionTypes: []string{"opcua"},
Connectors: []plugin.Connector{

{
Name: "opcua",
Use: "opcua [--endpoint <endpoint>]",
Expand All @@ -280,10 +263,9 @@ var DefaultProviders Providers = map[string]*Provider{
"os": {
Provider: &plugin.Provider{
Name: "os",
ID: "go.mondoo.com/cnquery/v9/providers/os",
ID: "go.mondoo.com/cnquery/providers/os",
ConnectionTypes: []string{"local", "ssh", "tar", "docker-snapshot", "vagrant", "docker-image", "docker-container", "docker-registry", "container-registry", "registry-image", "filesystem"},
Connectors: []plugin.Connector{

{
Name: "local",
Use: "local",
Expand Down Expand Up @@ -332,10 +314,9 @@ var DefaultProviders Providers = map[string]*Provider{
"slack": {
Provider: &plugin.Provider{
Name: "slack",
ID: "go.mondoo.com/cnquery/v9/providers/slack",
ID: "go.mondoo.com/cnquery/providers/slack",
ConnectionTypes: []string{"slack"},
Connectors: []plugin.Connector{

{
Name: "slack",
Use: "slack",
Expand All @@ -348,10 +329,9 @@ var DefaultProviders Providers = map[string]*Provider{
"terraform": {
Provider: &plugin.Provider{
Name: "terraform",
ID: "go.mondoo.com/cnquery/v9/providers/terraform",
ID: "go.mondoo.com/cnquery/providers/terraform",
ConnectionTypes: []string{"terraform-state", "terraform-plan", "terraform-hcl", "terraform-hcl-git"},
Connectors: []plugin.Connector{

{
Name: "terraform",
Use: "terraform PATH",
Expand All @@ -364,10 +344,9 @@ var DefaultProviders Providers = map[string]*Provider{
"vcd": {
Provider: &plugin.Provider{
Name: "vcd",
ID: "go.mondoo.com/cnquery/v9/providers/vcd",
ID: "go.mondoo.com/cnquery/providers/vcd",
ConnectionTypes: []string{"vcd"},
Connectors: []plugin.Connector{

{
Name: "vcd",
Use: "vcd [--user <user>] [--host <host>] [--organization <organization>] [--ask-pass] [--password <password>]",
Expand All @@ -380,10 +359,9 @@ var DefaultProviders Providers = map[string]*Provider{
"vsphere": {
Provider: &plugin.Provider{
Name: "vsphere",
ID: "go.mondoo.com/cnquery/v9/providers/vsphere",
ID: "go.mondoo.com/cnquery/providers/vsphere",
ConnectionTypes: []string{"vsphere"},
Connectors: []plugin.Connector{

{
Name: "vsphere",
Use: "vsphere user@host",
Expand Down
2 changes: 1 addition & 1 deletion providers/equinix/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

var Config = plugin.Provider{
Name: "equinix",
ID: "go.mondoo.com/cnquery/v9/providers/equinix",
ID: "go.mondoo.com/cnquery/providers/equinix",
Version: "9.1.16",
ConnectionTypes: []string{provider.ConnectionType},
Connectors: []plugin.Connector{
Expand Down
2 changes: 1 addition & 1 deletion providers/equinix/resources/equinix.lr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mondoo, Inc.
// SPDX-License-Identifier: BUSL-1.1

option provider = "go.mondoo.com/cnquery/v9/providers/equinix"
option provider = "go.mondoo.com/cnquery/providers/equinix"
option go_package = "go.mondoo.com/cnquery/v9/providers/equinix/resources"

// Equinix Metal project
Expand Down
2 changes: 1 addition & 1 deletion providers/gcp/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

var Config = plugin.Provider{
Name: "gcp",
ID: "go.mondoo.com/cnquery/v9/providers/gcp",
ID: "go.mondoo.com/cnquery/providers/gcp",
Version: "9.1.18",
ConnectionTypes: []string{
provider.ConnectionType,
Expand Down
2 changes: 1 addition & 1 deletion providers/gcp/resources/gcp.lr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mondoo, Inc.
// SPDX-License-Identifier: BUSL-1.1

option provider = "go.mondoo.com/cnquery/v9/providers/gcp"
option provider = "go.mondoo.com/cnquery/providers/gcp"
option go_package = "go.mondoo.com/cnquery/v9/providers/gcp/resources"

alias gcloud.organization = gcp.organization
Expand Down
2 changes: 1 addition & 1 deletion providers/github/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

var Config = plugin.Provider{
Name: "github",
ID: "go.mondoo.com/cnquery/v9/providers/github",
ID: "go.mondoo.com/cnquery/providers/github",
Version: "9.1.19",
ConnectionTypes: []string{provider.ConnectionType},
Connectors: []plugin.Connector{
Expand Down
2 changes: 1 addition & 1 deletion providers/github/resources/github.lr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Mondoo, Inc.
// SPDX-License-Identifier: BUSL-1.1

option provider = "go.mondoo.com/cnquery/v9/providers/github"
option provider = "go.mondoo.com/cnquery/providers/github"
option go_package = "go.mondoo.com/cnquery/v9/providers/github/resources"

// Git commit
Expand Down
Loading

0 comments on commit d7ed6a1

Please sign in to comment.