Skip to content

Commit

Permalink
support zoom_phone_auto_receptionist_ivr import (#55)
Browse files Browse the repository at this point in the history
Signed-off-by: krrrr38 <[email protected]>
  • Loading branch information
krrrr38 authored Oct 18, 2024
1 parent 89f059b commit d0afe43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions examples/resources/zoom_phone_auto_receptionist_ivr/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ${auto_reception_id}
terraform import zoom_phone_auto_receptionist_ivr.example t6wyhAZRQXXX_Rv3jj3XXX
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework-validators/mapvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/attr"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/objectdefault"
Expand All @@ -21,10 +22,11 @@ import (
)

var (
_ resource.Resource = &tfResource{}
_ resource.ResourceWithConfigure = &tfResource{}
allKeys = []string{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "#"}
keyActionDisabled = int32(-1)
_ resource.Resource = &tfResource{}
_ resource.ResourceWithConfigure = &tfResource{}
_ resource.ResourceWithImportState = &tfResource{}
allKeys = []string{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "#"}
keyActionDisabled = int32(-1)
)

func NewPhoneAutoReceptionistIvrResource() resource.Resource {
Expand Down Expand Up @@ -562,3 +564,7 @@ func (r *tfResource) Delete(ctx context.Context, req resource.DeleteRequest, res
"holiday_id": state.HolidayID.ValueString(),
})
}

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

0 comments on commit d0afe43

Please sign in to comment.