Skip to content

Commit

Permalink
Integrated ForceNew option with telephony resource, modified the docu…
Browse files Browse the repository at this point in the history
…mentation of resource telephony
  • Loading branch information
Mohit Hooda authored and Mohit Hooda committed Oct 16, 2023
1 parent 454777e commit 767665a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
10 changes: 5 additions & 5 deletions docs/data-sources/telephony.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "dcloud_licenses Data Source - terraform-provider-dcloud"
page_title: "dcloud_telephony Data Source - terraform-provider-dcloud"
subcategory: ""
description: |-
All the licenses currently in a given topology
All the telephony items currently in a given topology
---

# dcloud_licenses (Data Source)
# dcloud_telephony (Data Source)

All the licenses currently in a given topology
All the telephony items currently in a given topology



Expand All @@ -25,7 +25,7 @@ All the licenses currently in a given topology
- `telephony-items` (List of Object) (see [below for nested schema](#nestedatt--telephonyItems))

<a id="nestedatt--telephonyItems"></a>
### Nested Schema for `licenses`
### Nested Schema for `telephonyItems`

Read-Only:

Expand Down
8 changes: 2 additions & 6 deletions internal/dcloud/resource_telephony.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ func resourceTelephony() *schema.Resource {

CreateContext: resourceTelephonyCreate,
ReadContext: resourceTelephonyRead,
UpdateContext: resourceTelephonyUpdate,
DeleteContext: resourceTelephonyDelete,

Schema: map[string]*schema.Schema{
"topology_uid": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"uid": {
Type: schema.TypeString,
Expand All @@ -31,6 +30,7 @@ func resourceTelephony() *schema.Resource {
"inventory_telephony_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"inventory_telephony_name": {
Type: schema.TypeString,
Expand Down Expand Up @@ -90,10 +90,6 @@ func resourceTelephonyRead(ctx context.Context, data *schema.ResourceData, i int
return diags
}

func resourceTelephonyUpdate(ctx context.Context, data *schema.ResourceData, i interface{}) diag.Diagnostics {
return resourceTelephonyCreate(ctx, data, i)
}

func resourceTelephonyDelete(ctx context.Context, data *schema.ResourceData, i interface{}) diag.Diagnostics {
c := i.(*tbclient.Client)

Expand Down

0 comments on commit 767665a

Please sign in to comment.