diff --git a/internal/provider/data_source_stack_component.go b/internal/provider/data_source_stack_component.go index 11708f8..f6767b5 100644 --- a/internal/provider/data_source_stack_component.go +++ b/internal/provider/data_source_stack_component.go @@ -9,14 +9,14 @@ func dataSourceStackComponentRead(d *schema.ResourceData, m interface{}) error { client := m.(*Client) // Check that only one identifier method is used - hasID := d.GetOk("id") - hasName := d.GetOk("name") + id, hasID := d.GetOk("id") + name, hasName := d.GetOk("name") if hasID && hasName { return fmt.Errorf("only one of id or name should be specified") } // Try to find by ID first - if id, ok := d.GetOk("id"); ok { + if hasID { component, err := client.GetComponent(id.(string)) if err != nil { return fmt.Errorf("error reading stack component: %v", err) @@ -26,7 +26,6 @@ func dataSourceStackComponentRead(d *schema.ResourceData, m interface{}) error { } // Try to find by name and workspace - name, hasName := d.GetOk("name") workspace, hasWorkspace := d.GetOk("workspace") if !hasName { diff --git a/internal/provider/resource_service_connector.go b/internal/provider/resource_service_connector.go index e2aebb5..d0186f9 100644 --- a/internal/provider/resource_service_connector.go +++ b/internal/provider/resource_service_connector.go @@ -86,9 +86,6 @@ func resourceServiceConnectorCreate(d *schema.ResourceData, m interface{}) error client := m.(*Client) connector := ServiceConnectorBody{ - Name: d.Get("name").(string), - Type: d.Get("type").(string), - AuthMethod: d.Get("auth_method").(string), User: d.Get("user").(string), Workspace: d.Get("workspace").(string), } diff --git a/terraform-provider-zenml b/terraform-provider-zenml index b4c1e66..c073cf5 100755 Binary files a/terraform-provider-zenml and b/terraform-provider-zenml differ