Skip to content

Commit

Permalink
Resolve issue CiscoDevNet#348
Browse files Browse the repository at this point in the history
  • Loading branch information
seconroy committed Oct 14, 2024
1 parent 1dadb4f commit b38c848
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/resources/attach_feature_device_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ Required:

- `id` (String) Device ID
- `variables` (Map of String) Device variables

## Import

Import is supported using the following syntax:

```shell
terraform import sdwan_attach_feature_device_template.example "f6b2c44c-693c-4763-b010-895aa3d236bd"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import sdwan_attach_feature_device_template.example "f6b2c44c-693c-4763-b010-895aa3d236bd"
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"strings"

"github.com/CiscoDevNet/terraform-provider-sdwan/internal/provider/helpers"
"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/planmodifier"
Expand All @@ -34,6 +35,7 @@ import (

// Ensure provider defined types fully satisfy framework interfaces
var _ resource.Resource = &AttachFeatureDeviceTemplateResource{}
var _ resource.ResourceWithImportState = &AttachFeatureDeviceTemplateResource{}

func NewAttachFeatureDeviceTemplateResource() resource.Resource {
return &AttachFeatureDeviceTemplateResource{}
Expand Down Expand Up @@ -239,3 +241,7 @@ func (r *AttachFeatureDeviceTemplateResource) Delete(ctx context.Context, req re

resp.State.RemoveResource(ctx)
}

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

0 comments on commit b38c848

Please sign in to comment.