@@ -48,8 +48,8 @@ func ResourceNetappStoragePool() *schema.Resource {
4848
4949 Timeouts : & schema.ResourceTimeout {
5050 Create : schema .DefaultTimeout (45 * time .Minute ),
51- Update : schema .DefaultTimeout (20 * time .Minute ),
52- Delete : schema .DefaultTimeout (20 * time .Minute ),
51+ Update : schema .DefaultTimeout (60 * time .Minute ),
52+ Delete : schema .DefaultTimeout (45 * time .Minute ),
5353 },
5454
5555 CustomizeDiff : customdiff .All (
@@ -103,6 +103,7 @@ Auto-tiering can be enabled after storage pool creation but it can't be disabled
103103 },
104104 "custom_performance_enabled" : {
105105 Type : schema .TypeBool ,
106+ Computed : true ,
106107 Optional : true ,
107108 ForceNew : true ,
108109 Description : `Optional. True if using Independent Scaling of capacity and performance (Hyperdisk). Default is false.` ,
@@ -174,6 +175,16 @@ Possible values are: AUTO, MANUAL. Possible values: ["QOS_TYPE_UNSPECIFIED", "AU
174175 Optional : true ,
175176 Description : `Optional. Custom Performance Total Throughput of the pool (in MiB/s).` ,
176177 },
178+ "type" : {
179+ Type : schema .TypeString ,
180+ Computed : true ,
181+ Optional : true ,
182+ ForceNew : true ,
183+ ValidateFunc : verify .ValidateEnum ([]string {"STORAGE_POOL_TYPE_UNSPECIFIED" , "FILE" , "UNIFIED" , "" }),
184+ Description : `Type of the storage pool.
185+ This field is used to control whether the pool supports FILE based volumes only or UNIFIED (both FILE and BLOCK) volumes.
186+ If not specified during creation, it defaults to FILE. Possible values: ["STORAGE_POOL_TYPE_UNSPECIFIED", "FILE", "UNIFIED"]` ,
187+ },
177188 "zone" : {
178189 Type : schema .TypeString ,
179190 Computed : true ,
@@ -340,6 +351,12 @@ func resourceNetappStoragePoolCreate(d *schema.ResourceData, meta interface{}) e
340351 } else if v , ok := d .GetOkExists ("qos_type" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (qosTypeProp )) && (ok || ! reflect .DeepEqual (v , qosTypeProp )) {
341352 obj ["qosType" ] = qosTypeProp
342353 }
354+ typeProp , err := expandNetappStoragePoolType (d .Get ("type" ), d , config )
355+ if err != nil {
356+ return err
357+ } else if v , ok := d .GetOkExists ("type" ); ! tpgresource .IsEmptyValue (reflect .ValueOf (typeProp )) && (ok || ! reflect .DeepEqual (v , typeProp )) {
358+ obj ["type" ] = typeProp
359+ }
343360 effectiveLabelsProp , err := expandNetappStoragePoolEffectiveLabels (d .Get ("effective_labels" ), d , config )
344361 if err != nil {
345362 return err
@@ -511,6 +528,9 @@ func resourceNetappStoragePoolRead(d *schema.ResourceData, meta interface{}) err
511528 if err := d .Set ("hot_tier_size_used_gib" , flattenNetappStoragePoolHotTierSizeUsedGib (res ["hotTierSizeUsedGib" ], d , config )); err != nil {
512529 return fmt .Errorf ("Error reading StoragePool: %s" , err )
513530 }
531+ if err := d .Set ("type" , flattenNetappStoragePoolType (res ["type" ], d , config )); err != nil {
532+ return fmt .Errorf ("Error reading StoragePool: %s" , err )
533+ }
514534 if err := d .Set ("terraform_labels" , flattenNetappStoragePoolTerraformLabels (res ["labels" ], d , config )); err != nil {
515535 return fmt .Errorf ("Error reading StoragePool: %s" , err )
516536 }
@@ -962,6 +982,10 @@ func flattenNetappStoragePoolHotTierSizeUsedGib(v interface{}, d *schema.Resourc
962982 return v
963983}
964984
985+ func flattenNetappStoragePoolType (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
986+ return v
987+ }
988+
965989func flattenNetappStoragePoolTerraformLabels (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
966990 if v == nil {
967991 return v
@@ -1045,6 +1069,10 @@ func expandNetappStoragePoolQosType(v interface{}, d tpgresource.TerraformResour
10451069 return v , nil
10461070}
10471071
1072+ func expandNetappStoragePoolType (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
1073+ return v , nil
1074+ }
1075+
10481076func expandNetappStoragePoolEffectiveLabels (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (map [string ]string , error ) {
10491077 if v == nil {
10501078 return map [string ]string {}, nil
0 commit comments