Skip to content

Commit

Permalink
csi: add importer
Browse files Browse the repository at this point in the history
  • Loading branch information
lgfa29 committed Jul 26, 2023
1 parent cc2b3f9 commit 453d74d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nomad/resource_csi_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func resourceCSIVolume() *schema.Resource {
Delete: schema.DefaultTimeout(10 * time.Minute),
},

Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},

Schema: map[string]*schema.Schema{
"namespace": {
ForceNew: true,
Expand Down
4 changes: 4 additions & 0 deletions nomad/resource_csi_volume_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func resourceCSIVolumeRegistration() *schema.Resource {
Delete: schema.DefaultTimeout(10 * time.Minute),
},

Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},

Schema: map[string]*schema.Schema{
// the following cannot be updated without destroying:
// - Namespace/ID
Expand Down

0 comments on commit 453d74d

Please sign in to comment.