-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Data Source: wiz_kubernetes_clusters #52
New Data Source: wiz_kubernetes_clusters #52
Conversation
KubernetesClusters vendor.KubernetesClusters `json:"kubernetesClusters"` | ||
} | ||
|
||
func dataSourceKubernetesClusters() *schema.Resource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to dataSourceWizKubernetesClusters
func dataSourceKubernetesClusters() *schema.Resource { | |
func dataSourceWizKubernetesClusters() *schema.Resource { |
internal/provider/provider.go
Outdated
"wiz_cloud_accounts": dataSourceWizCloudAccounts(), | ||
"wiz_cloud_config_rules": dataSourceWizCloudConfigurationRules(), | ||
"wiz_host_config_rules": dataSourceWizHostConfigurationRules(), | ||
"wiz_kubernetes_clusters": dataSourceKubernetesClusters(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring
"wiz_kubernetes_clusters": dataSourceKubernetesClusters(), | |
"wiz_kubernetes_clusters": dataSourceWizKubernetesClusters(), |
internal/vendor/wiz.go
Outdated
// KubernetesClusters struct | ||
type KubernetesClusters struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is represented in the GraphQL schema as KubernetesClusterConnection. Rename to match GraphQL schema. This will simplify correlation for future developers and avoid future name conflicts.
kubernetesCluster Query:
type Query {
kubernetesClusters(after: String, filterBy: KubernetesClusterFilters, first: Int): KubernetesClusterConnection!
// KubernetesClusters struct | |
type KubernetesClusters struct { | |
// KubernetesClusterConnection struct | |
type KubernetesClusterConnection struct { |
|
||
// ReadKubernetesClusters struct | ||
type ReadKubernetesClusters struct { | ||
KubernetesClusters vendor.KubernetesClusters `json:"kubernetesClusters"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor the type from KubernetesClusters to KubernetesClusterConnection.
KubernetesClusters vendor.KubernetesClusters `json:"kubernetesClusters"` | |
KubernetesClusters vendor.KubernetesClusterConnection `json:"kubernetesClusters"` |
New Data Source: wiz_kubernetes_clusters (closes #51)