Skip to content

Commit

Permalink
bugfix: timeout is not set when import azapi_resource (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-henglu authored Mar 18, 2024
1 parent c33cf46 commit f6085d0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/services/azapi_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts"
"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
Expand Down Expand Up @@ -706,6 +707,13 @@ func (r *AzapiResource) ImportState(ctx context.Context, request resource.Import
ResponseExportValues: types.ListNull(types.StringType),
Output: types.StringValue("{}"),
Tags: types.MapNull(types.StringType),
Timeouts: timeouts.Value{
Object: types.ObjectNull(map[string]attr.Type{
"create": types.StringType,
"read": types.StringType,
"delete": types.StringType,
}),
},
}

responseBody, err := client.Get(ctx, id.AzureResourceId, id.ApiVersion)
Expand Down

0 comments on commit f6085d0

Please sign in to comment.