@@ -29,7 +29,7 @@ func dataFunctionRuntimePolicy() *schema.Resource {
2929 Description : "Version of the function runtime policy" ,
3030 Computed : true ,
3131 },
32-
32+
3333 // Policy control fields
3434 "enabled" : {
3535 Type : schema .TypeBool ,
@@ -46,7 +46,7 @@ func dataFunctionRuntimePolicy() *schema.Resource {
4646 Description : "Indicates the number of days after which the runtime policy will be changed to enforce mode." ,
4747 Computed : true ,
4848 },
49-
49+
5050 // Application scope fields
5151 "application_scopes" : {
5252 Type : schema .TypeList ,
@@ -94,7 +94,7 @@ func dataFunctionRuntimePolicy() *schema.Resource {
9494 },
9595 Computed : true ,
9696 },
97-
97+
9898 // Function security controls
9999 "drift_prevention" : {
100100 Type : schema .TypeList ,
@@ -200,7 +200,7 @@ func dataFunctionRuntimePolicy() *schema.Resource {
200200 Description : "Block deployment from disallowed images." ,
201201 Computed : true ,
202202 },
203-
203+
204204 // File monitoring and integrity
205205 "file_integrity_monitoring" : {
206206 Type : schema .TypeList ,
@@ -289,7 +289,7 @@ func dataFunctionRuntimePolicy() *schema.Resource {
289289 },
290290 },
291291 },
292-
292+
293293 // Malware protection
294294 "malware_scan_options" : {
295295 Type : schema .TypeList ,
@@ -331,10 +331,15 @@ func dataFunctionRuntimePolicy() *schema.Resource {
331331 },
332332 Computed : true ,
333333 },
334+ "file_forensic_collection" : {
335+ Type : schema .TypeBool ,
336+ Description : "Whether to enable file forensic collection." ,
337+ Computed : true ,
338+ },
334339 },
335340 },
336341 },
337-
342+
338343 // Honeypot/tripwire - renamed for consistency with resource
339344 "tripwire" : {
340345 Type : schema .TypeList ,
@@ -374,14 +379,14 @@ func dataFunctionRuntimePolicy() *schema.Resource {
374379 },
375380 },
376381 },
377-
382+
378383 // Network security
379384 "enable_crypto_mining_dns" : {
380385 Type : schema .TypeBool ,
381386 Description : "Enable detection of crypto mining via DNS monitoring" ,
382387 Computed : true ,
383388 },
384-
389+
385390 // Required internal fields
386391 "runtime_type" : {
387392 Type : schema .TypeString ,
@@ -393,7 +398,7 @@ func dataFunctionRuntimePolicy() *schema.Resource {
393398 Description : "Policy type identifier" ,
394399 Computed : true ,
395400 },
396-
401+
397402 // Administrative fields
398403 "author" : {
399404 Type : schema .TypeString ,
@@ -415,7 +420,7 @@ func dataFunctionRuntimePolicy() *schema.Resource {
415420 Description : "Indicates if audit check is enabled" ,
416421 Computed : true ,
417422 },
418-
423+
419424 // Internal tracking fields
420425 "created" : {
421426 Type : schema .TypeString ,
@@ -449,71 +454,71 @@ func dataFunctionRuntimePolicyRead(ctx context.Context, d *schema.ResourceData,
449454 d .Set ("name" , crp .Name )
450455 d .Set ("description" , crp .Description )
451456 d .Set ("version" , crp .Version )
452-
457+
453458 // Policy control fields
454459 d .Set ("enabled" , crp .Enabled )
455460 d .Set ("enforce" , crp .Enforce )
456461 d .Set ("enforce_after_days" , crp .EnforceAfterDays )
457-
462+
458463 // Application scope fields
459464 d .Set ("application_scopes" , crp .ApplicationScopes )
460465 d .Set ("exclude_application_scopes" , crp .ExcludeApplicationScopes )
461466 d .Set ("scope_expression" , crp .Scope .Expression )
462467 d .Set ("scope_variables" , flattenScopeVariables (crp .Scope .Variables ))
463-
468+
464469 // Function security controls
465470 d .Set ("drift_prevention" , flattenDriftPrevention (crp .DriftPrevention ))
466471 d .Set ("executable_blacklist" , flattenExecutableBlacklist (crp .ExecutableBlacklist ))
467472 d .Set ("allowed_executables" , flattenAllowedExecutables (crp .AllowedExecutables ))
468473 d .Set ("block_fileless_exec" , crp .BlockFilelessExec )
469474 d .Set ("block_non_compliant_workloads" , crp .BlockNonCompliantWorkloads )
470475 d .Set ("block_disallowed_images" , crp .BlockDisallowedImages )
471-
476+
472477 // File integrity monitoring
473478 // Since we can't compare with an empty struct due to slice fields,
474479 // check a key field to determine if we should set it
475480 if len (crp .FileIntegrityMonitoring .MonitoredFiles ) > 0 || crp .FileIntegrityMonitoring .Enabled {
476481 d .Set ("file_integrity_monitoring" , flattenFileIntegrityMonitoring (crp .FileIntegrityMonitoring ))
477482 }
478-
483+
479484 // Malware scan options
480485 // Since we can't compare with an empty struct due to slice fields,
481486 // check a key field to determine if we should set it
482- if len (crp .MalwareScanOptions .ExcludeDirectories ) > 0 ||
483- len (crp .MalwareScanOptions .IncludeDirectories ) > 0 ||
484- crp .MalwareScanOptions .Enabled {
487+ if len (crp .MalwareScanOptions .ExcludeDirectories ) > 0 ||
488+ len (crp .MalwareScanOptions .IncludeDirectories ) > 0 ||
489+ crp .MalwareScanOptions .Enabled {
485490 d .Set ("malware_scan_options" , flattenMalwareScanOptions (crp .MalwareScanOptions ))
486491 }
487-
492+
488493 // Honeypot/tripwire
489494 d .Set ("tripwire" , flattenTripwire (crp .Tripwire ))
490-
495+
491496 // Network security
492497 d .Set ("enable_crypto_mining_dns" , crp .EnableCryptoMiningDns )
493-
498+
494499 // Required internal fields
495500 d .Set ("runtime_type" , crp .RuntimeType )
496501 d .Set ("type" , crp .Type )
497-
502+
498503 // Administrative fields
499504 d .Set ("author" , crp .Author )
500505 d .Set ("is_auto_generated" , crp .IsAutoGenerated )
501506 d .Set ("is_ootb_policy" , crp .IsOOTBPolicy )
502507 d .Set ("is_audit_checked" , crp .IsAuditChecked )
503-
508+
504509 // Internal tracking fields - with special handling for time.Time
505510 d .Set ("created" , crp .Created )
506-
511+
507512 // Fix for time.Time field
508513 if ! crp .Updated .IsZero () {
509514 d .Set ("updated" , crp .Updated .Format (time .RFC3339 ))
510515 } else {
511516 d .Set ("updated" , "" )
512517 }
513-
518+
514519 d .Set ("lastupdate" , crp .Lastupdate )
515520
516521 d .SetId (name )
517-
522+
518523 return nil
519- }
524+ }
0 commit comments