This commit is contained in:
2026-02-11 13:02:14 +03:00
parent 069d63a65c
commit b8283ebfaf
277 changed files with 2184 additions and 4192 deletions

View File

@@ -20,9 +20,10 @@ func flattenAccessSEPPools(accessSEPPools stpolicy.ListAccessSEPPools) []map[str
res := make([]map[string]interface{}, 0, len(accessSEPPools))
for _, asp := range accessSEPPools {
temp := map[string]interface{}{
"sep_id": asp.SEPID,
"sep_name": asp.Name,
"pool_names": asp.PoolNames,
"sep_id": asp.SEPID,
"sep_name": asp.Name,
"pool_names": asp.PoolNames,
"sep_tech_status": asp.SepTechStatus,
}
res = append(res, temp)

View File

@@ -1,6 +1,9 @@
package stpolicy
import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
func resourceStoragePolicySchemaMake() map[string]*schema.Schema {
res := map[string]*schema.Schema{
@@ -21,6 +24,10 @@ func resourceStoragePolicySchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
Required: true,
},
"sep_name": {
Type: schema.TypeString,
Computed: true,
},
"sep_id": {
Type: schema.TypeInt,
Required: true,
@@ -114,6 +121,10 @@ func dataSourceStoragePolicySchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
},
},
"sep_name": {
Type: schema.TypeString,
Computed: true,
},
"sep_id": {
Type: schema.TypeInt,
Computed: true,
@@ -194,6 +205,11 @@ func dataSourceStoragePolicyListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeInt,
Optional: true,
},
"sep_tech_status": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"ENABLED", "DISABLED"}, true),
},
"pool_name": {
Type: schema.TypeString,
Optional: true,
@@ -240,11 +256,15 @@ func dataSourceStoragePolicyListSchemaMake() map[string]*schema.Schema {
Type: schema.TypeString,
},
},
"sep_name": {
Type: schema.TypeString,
Computed: true,
},
"sep_id": {
Type: schema.TypeInt,
Computed: true,
},
"sep_name": {
"sep_tech_status": {
Type: schema.TypeString,
Computed: true,
},

View File

@@ -55,6 +55,10 @@ func utilityStoragePolicyListCheckPresence(ctx context.Context, d *schema.Resour
req.SepID = uint64(SEPID.(int))
}
if SEPtechstatus, ok := d.GetOk("sep_tech_status"); ok {
req.SepTechStatus = SEPtechstatus.(string)
}
if poolName, ok := d.GetOk("pool_name"); ok {
req.PoolName = poolName.(string)
}