Skip to content

Commit

Permalink
fix(lb): Fix broken import feature
Browse files Browse the repository at this point in the history
  • Loading branch information
wonchulee committed Nov 25, 2024
1 parent ebe3d04 commit a1cfa83
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/service/loadbalancer/lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ import (
)

var (
_ resource.Resource = &lbResource{}
_ resource.Resource = &lbResource{}
_ resource.ResourceWithConfigure = &lbResource{}
_ resource.ResourceWithImportState = &lbResource{}
)

const (
Expand All @@ -52,6 +54,10 @@ type lbResource struct {
config *conn.ProviderConfig
}

func (r *lbResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
resource.ImportStatePassthroughID(ctx, path.Root("load_balancer_no"), req, resp)
}

func (l *lbResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {
resp.TypeName = req.ProviderTypeName + "_lb"
}
Expand Down

0 comments on commit a1cfa83

Please sign in to comment.