Skip to content

Commit

Permalink
[feat] add bindings for new resources
Browse files Browse the repository at this point in the history
  • Loading branch information
gene-redpanda committed Jan 8, 2024
1 parent 5ee21e0 commit 9dbb070
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions redpanda/redpanda.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ package redpanda

import (
"context"
"github.com/redpanda-data/terraform-provider-redpanda/redpanda/resources/acl"

Check failure on line 37 in redpanda/redpanda.go

View workflow job for this annotation

GitHub Actions / Lint go files

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(go.panda.dev/cloudv2) -s prefix(go.panda.dev/cloudv2/apps) (gci)
"github.com/redpanda-data/terraform-provider-redpanda/redpanda/resources/topic"
"os"

"github.com/hashicorp/terraform-plugin-framework/datasource"
Expand All @@ -45,6 +47,7 @@ import (
"github.com/redpanda-data/terraform-provider-redpanda/redpanda/resources/cluster"
"github.com/redpanda-data/terraform-provider-redpanda/redpanda/resources/namespace"
"github.com/redpanda-data/terraform-provider-redpanda/redpanda/resources/network"
"github.com/redpanda-data/terraform-provider-redpanda/redpanda/resources/user"
"github.com/redpanda-data/terraform-provider-redpanda/redpanda/utils"
)

Expand Down Expand Up @@ -159,8 +162,17 @@ func (*Redpanda) Schema(_ context.Context, _ provider.SchemaRequest, response *p
// DataSources returns a slice of functions to instantiate each Redpanda
// DataSource.
func (*Redpanda) DataSources(_ context.Context) []func() datasource.DataSource {
// TODO implement
return []func() datasource.DataSource{}
return []func() datasource.DataSource{
func() datasource.DataSource {
return &cluster.ClusterDataSource{}
},
func() datasource.DataSource {
return &namespace.NamespaceDataSource{}
},
func() datasource.DataSource {
return &network.NetworkDataSource{}
},
}
}

// Resources returns a slice of functions to instantiate each Redpanda resource.
Expand All @@ -175,5 +187,11 @@ func (*Redpanda) Resources(_ context.Context) []func() resource.Resource {
func() resource.Resource {
return &cluster.Cluster{}
},
func() resource.Resource {
return &user.User{}
},
func() resource.Resource { return &acl.Acl{} },
func() resource.Resource { return &user.User{} },
func() resource.Resource { return &topic.Topic{} },
}
}

0 comments on commit 9dbb070

Please sign in to comment.