aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/provider/project_resource.go2
-rw-r--r--internal/provider/projects_data_source.go2
-rw-r--r--internal/provider/provider.go5
3 files changed, 4 insertions, 5 deletions
diff --git a/internal/provider/project_resource.go b/internal/provider/project_resource.go
index 9e9d9e2..541f8b1 100644
--- a/internal/provider/project_resource.go
+++ b/internal/provider/project_resource.go
@@ -5,7 +5,7 @@ import (
"errors"
"fmt"
- "git.adyxax.org/adyxax/terraform-eventline/internal/evcli"
+ "git.adyxax.org/adyxax/terraform-eventline/external/evcli"
"github.com/exograd/eventline/pkg/eventline"
"github.com/exograd/go-daemon/ksuid"
"github.com/hashicorp/terraform-plugin-framework/path"
diff --git a/internal/provider/projects_data_source.go b/internal/provider/projects_data_source.go
index e0b5b8b..8ae8862 100644
--- a/internal/provider/projects_data_source.go
+++ b/internal/provider/projects_data_source.go
@@ -4,7 +4,7 @@ import (
"context"
"fmt"
- "git.adyxax.org/adyxax/terraform-eventline/internal/evcli"
+ "git.adyxax.org/adyxax/terraform-eventline/external/evcli"
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
diff --git a/internal/provider/provider.go b/internal/provider/provider.go
index 3ae769e..635580f 100644
--- a/internal/provider/provider.go
+++ b/internal/provider/provider.go
@@ -4,7 +4,7 @@ import (
"context"
"fmt"
- "git.adyxax.org/adyxax/terraform-eventline/internal/evcli"
+ "git.adyxax.org/adyxax/terraform-eventline/external/evcli"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/provider/schema"
@@ -57,13 +57,12 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
if resp.Diagnostics.HasError() {
return
}
- config := evcli.Config{API: evcli.APIConfig{Endpoint: data.Endpoint.ValueString()}}
+ config := evcli.APIConfig{Endpoint: data.Endpoint.ValueString(), Key: data.ApiKey.ValueString()}
client, err := evcli.NewClient(&config)
if err != nil {
resp.Diagnostics.AddError("new api client", fmt.Sprintf("Unable to instanciate eventline api client, got error: %s", err))
return
}
- client.APIKey = data.ApiKey.ValueString()
resp.DataSourceData = client
resp.ResourceData = client