Skip to content

Commit

Permalink
fix: get configs from opengovernance
Browse files Browse the repository at this point in the history
  • Loading branch information
artaasadi committed Nov 7, 2024
1 parent 114fcae commit 4de1d79
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ require (
github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1
github.com/nats-io/nats.go v1.36.0
github.com/opengovern/og-util v1.0.6-0.20241105222646-0d15ca2bc5c5
github.com/spf13/cobra v1.7.0
github.com/spf13/cobra v1.8.1
github.com/tombuildsstuff/giovanni v0.18.0
github.com/turbot/steampipe-plugin-sdk/v5 v5.10.1
go.uber.org/zap v1.26.0
Expand Down Expand Up @@ -165,6 +165,7 @@ require (
cloud.google.com/go/storage v1.38.0 // indirect
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization v1.0.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
Expand Down Expand Up @@ -270,6 +271,7 @@ require (
github.com/nats-io/nuid v1.0.1 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opengovern/opengovernance v0.434.30-feat-integrations-service.1 // indirect
github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect
github.com/pganalyze/pg_query_go/v4 v4.2.3 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapp
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/applicationinsights/armapplicationinsights v1.2.0/go.mod h1:S7Ss6Rm0nlKDRHKrO9eL2Be5EnX29Z09CNPWgK7o4+I=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0 h1:kRX8I0dWAcpW6Vq0m90CgV+qw4O1vXodgwrhoPr1RWs=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice v1.0.0/go.mod h1:avvc5/7qR4taCvAhOM7KFXuEHhAU0Wek9YX7sh9H3EM=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization v1.0.0 h1:qtRcg5Y7jNJ4jEzPq4GpWLfTspHdNe2ZK6LjwGcjgmU=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization v1.0.0/go.mod h1:lPneRe3TwsoDRKY4O6YDLXHhEWrD+TIRa8XrV/3/fqw=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v2 v2.2.0 h1:Hp+EScFOu9HeCbeW8WU2yQPJd4gGwhMgKxWe+G6jNzw=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization/v2 v2.2.0/go.mod h1:/pz8dyNQe+Ey3yBp/XuYz7oqX8YDNWVpPB0hH3XWfbc=
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/automation/armautomation v0.9.0 h1:pzgp0VZDAnmgAkUPeedW1dTd7v3kSrwxFNabFAzB158=
Expand Down Expand Up @@ -532,6 +534,7 @@ github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMe
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk=
Expand Down Expand Up @@ -998,6 +1001,8 @@ github.com/opengovern/og-util v1.0.6-0.20241105221143-8665d83abd91 h1:ZIzcv1mD09
github.com/opengovern/og-util v1.0.6-0.20241105221143-8665d83abd91/go.mod h1:7l7fNhK6uewIwA0cs7QagJuhjt/E6hEAC01SR8Y0kKk=
github.com/opengovern/og-util v1.0.6-0.20241105222646-0d15ca2bc5c5 h1:rfIElwBZ3EdvKX6gV/luUAdbrILVKyNpWP/VXHWb5ik=
github.com/opengovern/og-util v1.0.6-0.20241105222646-0d15ca2bc5c5/go.mod h1:7l7fNhK6uewIwA0cs7QagJuhjt/E6hEAC01SR8Y0kKk=
github.com/opengovern/opengovernance v0.434.30-feat-integrations-service.1 h1:s9UbN5g8/44vus6b507vnHUmL4gF7BTdTkmqHc/P8Ec=
github.com/opengovern/opengovernance v0.434.30-feat-integrations-service.1/go.mod h1:TOmxA2GsntO8AncUBf/xQX+VRbTQz/NRqggXmBp3nDk=
github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ=
github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8=
github.com/pganalyze/pg_query_go/v4 v4.2.3 h1:cNLqyiVMasV7YGWyYV+fkXyHp32gDfXVNCqoHztEGNk=
Expand Down Expand Up @@ -1058,6 +1063,7 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/std-uritemplate/std-uritemplate/go v0.0.57 h1:GHGjptrsmazP4IVDlUprssiEf9ESVkbjx15xQXXzvq4=
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/runable/steampipe_es_client_generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"flag"
"fmt"
"github.com/opengovern/og-describer-entraid/provider/configs"
"github.com/opengovern/og-describer-azure/provider/configs"
"go/ast"
"go/format"
"go/parser"
Expand Down
10 changes: 3 additions & 7 deletions provider/configs/credentials.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package configs

import "github.com/opengovern/opengovernance/services/integration/integration-type/azure_subscription/configs"

type IntegrationCredentials struct {
TenantID string `json:"tenant_id"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
CertificatePath string `json:"certificate_path"`
CertificatePass string `json:"certificate_pass"`
Username string `json:"username"`
Password string `json:"password"`
configs.IntegrationCredentials
}
8 changes: 5 additions & 3 deletions provider/configs/general.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package configs

import "github.com/opengovern/og-util/pkg/integration"
import (
"github.com/opengovern/opengovernance/services/integration/integration-type/azure_subscription/configs"
)

const (
IntegrationTypeLower = "azure" // example: aws, azure
IntegrationName = integration.Type("AZURE_SUBSCRIPTION") // example: AWS_ACCOUNT, AZURE_SUBSCRIPTION
IntegrationTypeLower = "azure" // example: aws, azure
IntegrationName = configs.IntegrationName
OGPluginRepoURL = "github.com/opengovern/og-describer-azure" // example: github.com/opengovern/og-describer-aws
)
12 changes: 7 additions & 5 deletions provider/configs/nats.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package configs

import "github.com/opengovern/opengovernance/services/integration/integration-type/azure_subscription/configs"

const (
StreamName = "og_azure_describer"
JobQueueTopic = "og_azure_describer_job_queue"
ConsumerGroup = "azure-describer"
JobQueueTopicManuals = "og_azure_describer_manuals_job_queue"
ConsumerGroupManuals = "azure-describer-manuals"
StreamName = configs.ConsumerGroup
JobQueueTopic = configs.JobQueueTopic
ConsumerGroup = configs.ConsumerGroup
JobQueueTopicManuals = configs.JobQueueTopicManuals
ConsumerGroupManuals = configs.ConsumerGroupManuals
)

0 comments on commit 4de1d79

Please sign in to comment.