Skip to content

Commit 9830c4d

Browse files
authored
Merge pull request #514 from NetApp/496-enhancement-netapp-ontap_lun
496 - enhancement - netapp-ontap_lun
2 parents c9aa30a + 8e9a05d commit 9830c4d

10 files changed

Lines changed: 72 additions & 32 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# 2.2.1
1+
# 2.3.0
22

33
ENHANCEMENTS:
44

5+
- **netapp-ontap_lun**: added `space.scsi_thin_provisioning_support_enabled` option. ([#496](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/496))
56
- **netapp-ontap_volume**, **netapp-ontap_volumes**: added `autosize.*` options to data sources. ([#509](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/509))
67

78
# 2.2.0 (2025-05-01)

docs/data-sources/lun.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,6 @@ Read-Only:
9191

9292
Read-Only:
9393

94+
- `scsi_thin_provisioning_support_enabled` (Boolean) Specifies the value for the space allocation attribute, which determines if the LUN supports the SCSI Thin Provisioning features
9495
- `size` (Number) Size of the lun
9596
- `used` (Number) Used space of the lun

docs/data-sources/luns.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,6 @@ Read-Only:
101101

102102
Read-Only:
103103

104+
- `scsi_thin_provisioning_support_enabled` (Boolean) Specifies the value for the space allocation attribute, which determines if the LUN supports the SCSI Thin Provisioning features
104105
- `size` (Number) Size of lun in bytes
105106
- `used` (Number) Used space of lun in bytes

docs/resources/lun.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ resource "netapp-ontap_lun" "storage_lun" {
3434
volume_name = "lunTest"
3535
os_type = "linux"
3636
size = 1048576
37-
3837
}
3938
4039
```
@@ -54,6 +53,7 @@ resource "netapp-ontap_lun" "storage_lun" {
5453
### Optional
5554

5655
- `qos_policy_name` (String) QoS policy name
56+
- `scsi_thin_provisioning_support_enabled` (Boolean) Specifies the value for the space allocation attribute, which determines if the LUN supports the SCSI Thin Provisioning features
5757
- `size_unit` (String) The unit used to interpret the size parameter
5858

5959
### Read-Only

internal/interfaces/storage_lun.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ type LunQoSPolicy struct {
4242

4343
// LunSpace describes the data model for space.
4444
type LunSpace struct {
45-
Size int64 `mapstructure:"size,omitempty"`
46-
Used int64 `mapstructure:"used,omitempty"`
45+
Size int64 `mapstructure:"size,omitempty"`
46+
Used int64 `mapstructure:"used,omitempty"`
47+
Allocation *bool `mapstructure:"scsi_thin_provisioning_support_enabled,omitempty"`
4748
}
4849

4950
// StorageLunResourceBodyDataModelONTAP describes the body data model using go types for mapping.
@@ -66,7 +67,8 @@ type volume struct {
6667
}
6768

6869
type space struct {
69-
Size int64 `mapstructure:"size,omitempty"`
70+
Size int64 `mapstructure:"size,omitempty"`
71+
Allocation *bool `mapstructure:"scsi_thin_provisioning_support_enabled,omitempty"`
7072
}
7173

7274
// StorageLunDataSourceFilterModel describes the data source data model for queries.

internal/provider/storage/storage_lun_data_source.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ type StorageLunDataSourceQoSPolicyModel struct {
7373

7474
// StorageLunDataSourceSpaceModel describes the data source data model for queries.
7575
type StorageLunDataSourceSpaceModel struct {
76-
Size types.Int64 `tfsdk:"size"`
77-
Used types.Int64 `tfsdk:"used"`
76+
Size types.Int64 `tfsdk:"size"`
77+
Used types.Int64 `tfsdk:"used"`
78+
Allocation types.Bool `tfsdk:"scsi_thin_provisioning_support_enabled"`
7879
}
7980

8081
// Metadata returns the data source type name.
@@ -162,6 +163,10 @@ func (d *StorageLunDataSource) Schema(ctx context.Context, req datasource.Schema
162163
MarkdownDescription: "Used space of the lun",
163164
Computed: true,
164165
},
166+
"scsi_thin_provisioning_support_enabled": schema.BoolAttribute{
167+
MarkdownDescription: "Specifies the value for the space allocation attribute, which determines if the LUN supports the SCSI Thin Provisioning features",
168+
Computed: true,
169+
},
165170
},
166171
},
167172
"id": schema.StringAttribute{
@@ -227,8 +232,9 @@ func (d *StorageLunDataSource) Read(ctx context.Context, req datasource.ReadRequ
227232
data.QoSPolicy.UUID = types.StringValue(restInfo.QoSPolicy.UUID)
228233
}
229234
data.Space = &StorageLunDataSourceSpaceModel{
230-
Size: types.Int64Value(restInfo.Space.Size),
231-
Used: types.Int64Value(restInfo.Space.Used),
235+
Size: types.Int64Value(restInfo.Space.Size),
236+
Used: types.Int64Value(restInfo.Space.Used),
237+
Allocation: types.BoolPointerValue(restInfo.Space.Allocation),
232238
}
233239
data.ID = types.StringValue(restInfo.UUID)
234240

internal/provider/storage/storage_lun_resource.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/hashicorp/terraform-plugin-framework/resource"
1212
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
1313
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
14+
"github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
1415
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
1516
"github.com/hashicorp/terraform-plugin-framework/types"
1617
"github.com/hashicorp/terraform-plugin-log/tflog"
@@ -57,6 +58,7 @@ type StorageLunResourceModel struct {
5758
QoSPolicyName types.String `tfsdk:"qos_policy_name"`
5859
SerialNumber types.String `tfsdk:"serial_number"`
5960
LogicalUnit types.String `tfsdk:"logical_unit"`
61+
Allocation types.Bool `tfsdk:"scsi_thin_provisioning_support_enabled"`
6062
ID types.String `tfsdk:"id"`
6163
}
6264

@@ -123,6 +125,14 @@ func (r *StorageLunResource) Schema(ctx context.Context, req resource.SchemaRequ
123125
stringplanmodifier.UseStateForUnknown(),
124126
},
125127
},
128+
"scsi_thin_provisioning_support_enabled": schema.BoolAttribute{
129+
MarkdownDescription: "Specifies the value for the space allocation attribute, which determines if the LUN supports the SCSI Thin Provisioning features",
130+
Optional: true,
131+
Computed: true,
132+
PlanModifiers: []planmodifier.Bool{
133+
boolplanmodifier.UseStateForUnknown(),
134+
},
135+
},
126136
"id": schema.StringAttribute{
127137
MarkdownDescription: "StorageLun UUID",
128138
Computed: true,
@@ -196,6 +206,7 @@ func (r *StorageLunResource) Read(ctx context.Context, req resource.ReadRequest,
196206
data.VolumeName = types.StringValue(restInfo.Location.Volume.Name)
197207
data.OSType = types.StringValue(restInfo.OSType)
198208
data.SerialNumber = types.StringValue(restInfo.SerialNumber)
209+
data.Allocation = types.BoolPointerValue(restInfo.Space.Allocation)
199210
if !data.SizeUnit.IsNull() {
200211
var sizeUnit string
201212
var size int64
@@ -253,6 +264,9 @@ func (r *StorageLunResource) Create(ctx context.Context, req resource.CreateRequ
253264
if !data.QoSPolicyName.IsNull() {
254265
body.QosPolicy = data.QoSPolicyName.ValueString()
255266
}
267+
if !data.Allocation.IsNull() {
268+
body.Space.Allocation = data.Allocation.ValueBoolPointer()
269+
}
256270

257271
client, err := connection.GetRestClient(errorHandler, r.config, data.CxProfileName)
258272
if err != nil {
@@ -269,6 +283,7 @@ func (r *StorageLunResource) Create(ctx context.Context, req resource.CreateRequ
269283
data.SerialNumber = types.StringValue(resource.SerialNumber)
270284
data.LogicalUnit = types.StringValue(resource.Location.LogicalUnit)
271285
data.Name = types.StringValue(resource.Name)
286+
data.Allocation = types.BoolPointerValue(resource.Space.Allocation)
272287

273288
tflog.Trace(ctx, "created a resource")
274289

@@ -323,6 +338,9 @@ func (r *StorageLunResource) Update(ctx context.Context, req resource.UpdateRequ
323338
if !plan.QoSPolicyName.Equal(state.QoSPolicyName) {
324339
request.QosPolicy = plan.QoSPolicyName.ValueString()
325340
}
341+
if !plan.Allocation.Equal(state.Allocation) {
342+
request.Space.Allocation = plan.Allocation.ValueBoolPointer()
343+
}
326344
err = interfaces.UpdateStorageLun(errorHandler, *client, state.ID.ValueString(), request)
327345
if err != nil {
328346
return

internal/provider/storage/storage_lun_resource_alias_test.go

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func TestAccStorageLunResouceAlias(t *testing.T) {
5151
{
5252
ResourceName: "netapp-ontap_storage_lun_resource.example",
5353
ImportState: true,
54-
ImportStateId: fmt.Sprintf("%s,%s,%s,%s", "/vol/tf_acc_volume/tf_acc_lun", "tf_acc_volume", "tf_acc_svm", "cluster4"),
54+
ImportStateId: fmt.Sprintf("%s,%s,%s,%s", "/vol/tf_acc_volume/tf_acc_lun", "tf_acc_volume", "tf_acc_svm", "cluster5"),
5555
Check: resource.ComposeTestCheckFunc(
5656
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example", "name", "tf_acc_lun"),
5757
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example", "os_type", "linux"),
@@ -60,31 +60,33 @@ func TestAccStorageLunResouceAlias(t *testing.T) {
6060
},
6161
// create storage lun with size_unit
6262
{
63-
Config: testAccStorageLunResourceWithSizeUnitConfigAlias("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 4, "kb"),
63+
Config: testAccStorageLunResourceWithSizeUnitConfigAlias("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 4, "kb", true),
6464
Check: resource.ComposeTestCheckFunc(
6565
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "name", "/vol/tf_acc_volume/ACC-lun-size"),
6666
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "svm_name", "tf_acc_svm"),
6767
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "volume_name", "tf_acc_volume"),
6868
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "os_type", "linux"),
6969
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "size", "4"),
7070
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "size_unit", "kb"),
71+
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "scsi_thin_provisioning_support_enabled", "true"),
7172
),
7273
},
7374
// update storage lun with size_unit
7475
{
75-
Config: testAccStorageLunResourceWithSizeUnitConfigAlias("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 5, "kb"),
76+
Config: testAccStorageLunResourceWithSizeUnitConfigAlias("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 5, "kb", false),
7677
Check: resource.ComposeTestCheckFunc(
7778
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "name", "/vol/tf_acc_volume/ACC-lun-size"),
7879
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "svm_name", "tf_acc_svm"),
7980
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "volume_name", "tf_acc_volume"),
8081
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "os_type", "linux"),
8182
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "size", "5"),
8283
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "size_unit", "kb"),
84+
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "scsi_thin_provisioning_support_enabled", "false"),
8385
),
8486
},
8587
// update storage lun size_unit
8688
{
87-
Config: testAccStorageLunResourceWithSizeUnitConfigAlias("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 5, "mb"),
89+
Config: testAccStorageLunResourceWithSizeUnitConfigAlias("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 5, "mb", true),
8890
Check: resource.ComposeTestCheckFunc(
8991
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "name", "/vol/tf_acc_volume/ACC-lun-size"),
9092
resource.TestCheckResourceAttr("netapp-ontap_storage_lun_resource.example_size", "svm_name", "tf_acc_svm"),
@@ -110,7 +112,7 @@ func testAccStorageLunResourceConfigAlias(logicalUnit string, svmname string, vo
110112
provider "netapp-ontap" {
111113
connection_profiles = [
112114
{
113-
name = "cluster4"
115+
name = "cluster5"
114116
hostname = "%s"
115117
username = "%s"
116118
password = "%s"
@@ -121,7 +123,7 @@ provider "netapp-ontap" {
121123
122124
resource "netapp-ontap_storage_lun_resource" "example" {
123125
# required to know which system to interface with
124-
cx_profile_name = "cluster4"
126+
cx_profile_name = "cluster5"
125127
logical_unit = "%s"
126128
svm_name = "%s"
127129
volume_name = "%s"
@@ -130,7 +132,7 @@ resource "netapp-ontap_storage_lun_resource" "example" {
130132
}`, host, admin, password, logicalUnit, svmname, volumeName, osType, size)
131133
}
132134

133-
func testAccStorageLunResourceWithSizeUnitConfigAlias(logicalUnit string, svmname string, volumeName string, osType string, size int64, size_unit string) string {
135+
func testAccStorageLunResourceWithSizeUnitConfigAlias(logicalUnit string, svmname string, volumeName string, osType string, size int64, sizeUnit string, spaceAllocation bool) string {
134136
host := os.Getenv("TF_ACC_NETAPP_HOST")
135137
admin := os.Getenv("TF_ACC_NETAPP_USER")
136138
password := os.Getenv("TF_ACC_NETAPP_PASS")
@@ -142,7 +144,7 @@ func testAccStorageLunResourceWithSizeUnitConfigAlias(logicalUnit string, svmnam
142144
provider "netapp-ontap" {
143145
connection_profiles = [
144146
{
145-
name = "cluster4"
147+
name = "cluster5"
146148
hostname = "%s"
147149
username = "%s"
148150
password = "%s"
@@ -153,12 +155,13 @@ provider "netapp-ontap" {
153155
154156
resource "netapp-ontap_storage_lun_resource" "example_size" {
155157
# required to know which system to interface with
156-
cx_profile_name = "cluster4"
158+
cx_profile_name = "cluster5"
157159
logical_unit = "%s"
158160
svm_name = "%s"
159161
volume_name = "%s"
160162
os_type = "%s"
161163
size = "%d"
162164
size_unit = "%s"
163-
}`, host, admin, password, logicalUnit, svmname, volumeName, osType, size, size_unit)
165+
scsi_thin_provisioning_support_enabled = "%t"
166+
}`, host, admin, password, logicalUnit, svmname, volumeName, osType, size, sizeUnit, spaceAllocation)
164167
}

internal/provider/storage/storage_lun_resource_test.go

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,40 +51,42 @@ func TestAccStorageLunResouce(t *testing.T) {
5151
{
5252
ResourceName: "netapp-ontap_lun.example",
5353
ImportState: true,
54-
ImportStateId: fmt.Sprintf("%s,%s,%s,%s", "/vol/tf_acc_volume/tf_acc_lun", "tf_acc_volume", "tf_acc_svm", "cluster4"),
54+
ImportStateId: fmt.Sprintf("%s,%s,%s,%s", "/vol/tf_acc_volume/tf_acc_lun", "tf_acc_volume", "tf_acc_svm", "cluster5"),
5555
Check: resource.ComposeTestCheckFunc(
56-
resource.TestCheckResourceAttr("netapp-ontap_lun.example", "name", "ACC-import-lun"),
56+
resource.TestCheckResourceAttr("netapp-ontap_lun.example", "name", "tf_acc_lun"),
5757
resource.TestCheckResourceAttr("netapp-ontap_lun.example", "os_type", "linux"),
5858
resource.TestCheckResourceAttr("netapp-ontap_lun.example", "size", "1048576"),
5959
),
6060
},
6161
// create storage lun with size_unit
6262
{
63-
Config: testAccStorageLunResourceWithSizeUnitConfig("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 4, "kb"),
63+
Config: testAccStorageLunResourceWithSizeUnitConfig("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 4, "kb", true),
6464
Check: resource.ComposeTestCheckFunc(
6565
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "name", "/vol/tf_acc_volume/ACC-lun-size"),
6666
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "svm_name", "tf_acc_svm"),
6767
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "volume_name", "tf_acc_volume"),
6868
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "os_type", "linux"),
6969
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "size", "4"),
7070
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "size_unit", "kb"),
71+
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "scsi_thin_provisioning_support_enabled", "true"),
7172
),
7273
},
7374
// update storage lun with size_unit
7475
{
75-
Config: testAccStorageLunResourceWithSizeUnitConfig("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 5, "kb"),
76+
Config: testAccStorageLunResourceWithSizeUnitConfig("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 5, "kb", false),
7677
Check: resource.ComposeTestCheckFunc(
7778
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "name", "/vol/tf_acc_volume/ACC-lun-size"),
7879
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "svm_name", "tf_acc_svm"),
7980
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "volume_name", "tf_acc_volume"),
8081
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "os_type", "linux"),
8182
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "size", "5"),
8283
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "size_unit", "kb"),
84+
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "scsi_thin_provisioning_support_enabled", "false"),
8385
),
8486
},
8587
// update storage lun size_unit
8688
{
87-
Config: testAccStorageLunResourceWithSizeUnitConfig("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 5, "mb"),
89+
Config: testAccStorageLunResourceWithSizeUnitConfig("ACC-lun-size", "tf_acc_svm", "tf_acc_volume", "linux", 5, "mb", true),
8890
Check: resource.ComposeTestCheckFunc(
8991
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "name", "/vol/tf_acc_volume/ACC-lun-size"),
9092
resource.TestCheckResourceAttr("netapp-ontap_lun.example_size", "svm_name", "tf_acc_svm"),
@@ -110,7 +112,7 @@ func testAccStorageLunResourceConfig(logicalUnit string, svmname string, volumeN
110112
provider "netapp-ontap" {
111113
connection_profiles = [
112114
{
113-
name = "cluster4"
115+
name = "cluster5"
114116
hostname = "%s"
115117
username = "%s"
116118
password = "%s"
@@ -121,7 +123,7 @@ provider "netapp-ontap" {
121123
122124
resource "netapp-ontap_lun" "example" {
123125
# required to know which system to interface with
124-
cx_profile_name = "cluster4"
126+
cx_profile_name = "cluster5"
125127
logical_unit = "%s"
126128
svm_name = "%s"
127129
volume_name = "%s"
@@ -130,7 +132,7 @@ resource "netapp-ontap_lun" "example" {
130132
}`, host, admin, password, logicalUnit, svmname, volumeName, osType, size)
131133
}
132134

133-
func testAccStorageLunResourceWithSizeUnitConfig(logicalUnit string, svmname string, volumeName string, osType string, size int64, size_unit string) string {
135+
func testAccStorageLunResourceWithSizeUnitConfig(logicalUnit string, svmname string, volumeName string, osType string, size int64, sizeUnit string, spaceAllocation bool) string {
134136
host := os.Getenv("TF_ACC_NETAPP_HOST")
135137
admin := os.Getenv("TF_ACC_NETAPP_USER")
136138
password := os.Getenv("TF_ACC_NETAPP_PASS")
@@ -142,7 +144,7 @@ func testAccStorageLunResourceWithSizeUnitConfig(logicalUnit string, svmname str
142144
provider "netapp-ontap" {
143145
connection_profiles = [
144146
{
145-
name = "cluster4"
147+
name = "cluster5"
146148
hostname = "%s"
147149
username = "%s"
148150
password = "%s"
@@ -153,12 +155,13 @@ provider "netapp-ontap" {
153155
154156
resource "netapp-ontap_lun" "example_size" {
155157
# required to know which system to interface with
156-
cx_profile_name = "cluster4"
158+
cx_profile_name = "cluster5"
157159
logical_unit = "%s"
158160
svm_name = "%s"
159161
volume_name = "%s"
160162
os_type = "%s"
161163
size = "%d"
162164
size_unit = "%s"
163-
}`, host, admin, password, logicalUnit, svmname, volumeName, osType, size, size_unit)
165+
scsi_thin_provisioning_support_enabled = "%t"
166+
}`, host, admin, password, logicalUnit, svmname, volumeName, osType, size, sizeUnit, spaceAllocation)
164167
}

internal/provider/storage/storage_luns_data_source.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ func (d *StorageLunsDataSource) Schema(ctx context.Context, req datasource.Schem
159159
MarkdownDescription: "Used space of lun in bytes",
160160
Computed: true,
161161
},
162+
"scsi_thin_provisioning_support_enabled": schema.BoolAttribute{
163+
MarkdownDescription: "Specifies the value for the space allocation attribute, which determines if the LUN supports the SCSI Thin Provisioning features",
164+
Computed: true,
165+
},
162166
},
163167
},
164168
"id": schema.StringAttribute{
@@ -244,8 +248,9 @@ func (d *StorageLunsDataSource) Read(ctx context.Context, req datasource.ReadReq
244248
UUID: types.StringValue(record.QoSPolicy.UUID),
245249
},
246250
Space: &StorageLunDataSourceSpaceModel{
247-
Size: types.Int64Value(record.Space.Size),
248-
Used: types.Int64Value(record.Space.Used),
251+
Size: types.Int64Value(record.Space.Size),
252+
Used: types.Int64Value(record.Space.Used),
253+
Allocation: types.BoolPointerValue(record.Space.Allocation),
249254
},
250255
ID: types.StringValue(record.UUID),
251256
}

0 commit comments

Comments
 (0)