Skip to content

Commit

Permalink
fix more resources
Browse files Browse the repository at this point in the history
  • Loading branch information
maksym-nazarenko committed Oct 21, 2023
1 parent f93a9f6 commit 54614b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mikrotik/resource_firewall_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/ddelnano/terraform-provider-mikrotik/client"
"github.com/ddelnano/terraform-provider-mikrotik/mikrotik/internal/types/defaultaware"
"github.com/ddelnano/terraform-provider-mikrotik/mikrotik/internal/utils"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
Expand Down Expand Up @@ -141,7 +142,7 @@ func (r *firewallFilterRule) Delete(ctx context.Context, req resource.DeleteRequ

func (r *firewallFilterRule) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
// Retrieve import ID and save to id attribute
resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
utils.ImportUppercaseWrapper(resource.ImportStatePassthroughID)(ctx, path.Root("id"), req, resp)
}

type firewallFilterRuleModel struct {
Expand Down
3 changes: 2 additions & 1 deletion mikrotik/resource_interface_list_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

"github.com/ddelnano/terraform-provider-mikrotik/client"
"github.com/ddelnano/terraform-provider-mikrotik/mikrotik/internal/utils"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
Expand Down Expand Up @@ -96,7 +97,7 @@ func (r *interfaceListMember) Delete(ctx context.Context, req resource.DeleteReq

func (r *interfaceListMember) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
// Retrieve import ID and save to id attribute
resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
utils.ImportUppercaseWrapper(resource.ImportStatePassthroughID)(ctx, path.Root("id"), req, resp)
}

type interfaceListMemberModel struct {
Expand Down
2 changes: 1 addition & 1 deletion mikrotik/resource_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (r *pool) Delete(ctx context.Context, req resource.DeleteRequest, resp *res

func (r *pool) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
// Retrieve import ID and save to id attribute
resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
utils.ImportUppercaseWrapper(resource.ImportStatePassthroughID)(ctx, path.Root("id"), req, resp)
}

type poolModel struct {
Expand Down

0 comments on commit 54614b1

Please sign in to comment.