@@ -15,11 +15,14 @@ func resourceFunctionAssurancePolicy() *schema.Resource {
1515 StateContext : schema .ImportStatePassthroughContext ,
1616 },
1717 Schema : map [string ]* schema.Schema {
18- "assurance_type" : {
19- Type : schema .TypeString ,
20- Description : "What type of assurance policy is described." ,
21- Optional : true ,
22- },
18+ /*
19+ "assurance_type": {
20+ Type: schema.TypeString,
21+ Description: "What type of assurance policy is described.",
22+ Optional: true,
23+ Computed: true,
24+ },
25+ */
2326 "id" : {
2427 Type : schema .TypeString ,
2528 Computed : true ,
@@ -630,7 +633,7 @@ func resourceFunctionAssurancePolicyCreate(d *schema.ResourceData, m interface{}
630633 name := d .Get ("name" ).(string )
631634 assurance_type := "function"
632635
633- iap := expandAssurancePolicy (d )
636+ iap := expandAssurancePolicy (d , assurance_type )
634637 err := ac .CreateAssurancePolicy (iap , assurance_type )
635638
636639 if err != nil {
@@ -652,7 +655,7 @@ func resourceFunctionAssurancePolicyUpdate(d *schema.ResourceData, m interface{}
652655 "function_integrity_enabled" , "dta_enabled" , "cves_white_list" , "cves_white_list_enabled" , "blacklist_permissions_enabled" , "blacklist_permissions" , "enabled" , "enforce" , "enforce_after_days" , "ignore_recently_published_vln" , "ignore_recently_published_vln_period" ,
653656 "ignore_risk_resources_enabled" , "ignored_risk_resources" , "application_scopes" , "auto_scan_enabled" , "auto_scan_configured" , "auto_scan_time" , "required_labels_enabled" , "required_labels" , "forbidden_labels_enabled" , "forbidden_labels" , "domain_name" ,
654657 "domain" , "description" , "dta_severity" , "scan_nfs_mounts" , "malware_action" , "partial_results_image_fail" , "maximum_score_exclude_no_fix" ) {
655- iap := expandAssurancePolicy (d )
658+ iap := expandAssurancePolicy (d , assurance_type )
656659 err := ac .UpdateAssurancePolicy (iap , assurance_type )
657660 if err == nil {
658661 err1 := resourceFunctionAssurancePolicyRead (d , m )
@@ -674,7 +677,7 @@ func resourceFunctionAssurancePolicyRead(d *schema.ResourceData, m interface{})
674677
675678 iap , err := ac .GetAssurancePolicy (d .Id (), assurance_type )
676679 if err == nil {
677- d .Set ("assurance_type" , iap .AssuranceType )
680+ // d.Set("assurance_type", iap.AssuranceType)
678681 d .Set ("name" , iap .Name )
679682 d .Set ("description" , iap .Description )
680683 d .Set ("author" , iap .Author )
0 commit comments