File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ func TestRuleFalcoCloudAWSCloudtrail(t *testing.T) {
243243func TestRuleFalcoCloudAWSCloudtrailAppend (t * testing.T ) {
244244 steps := []resource.TestStep {
245245 {
246- Config : ruleFalcoCloudAWSCloudtrailWithAppend ( ),
246+ Config : RuleFalcoCloudAWSCloudtrailWithAppend ( randomString () ),
247247 },
248248 }
249249 runTest (steps , t )
@@ -449,18 +449,18 @@ resource "sysdig_secure_rule_falco" "falco_rule_with_exceptions" {
449449}
450450
451451func existingFalcoRuleWithExceptions (name string ) string {
452- return `
452+ return fmt . Sprintf ( `
453453resource "sysdig_secure_rule_falco" "attach_to_cluster_admin_role_exceptions" {
454454 name = "Terminal shell in container" # Sysdig-provided
455455 append = true
456456
457457 exceptions {
458- name = "proc_name "
458+ name = "proc_name_%s "
459459 fields = ["proc.name"]
460460 comps = ["in"]
461461 values = jsonencode([["sh"]])
462462 }
463- }`
463+ }` , name )
464464}
465465
466466func ruleFalcoTerminalShellWithMinimumEngineVersion (name string ) string {
@@ -492,19 +492,19 @@ resource "sysdig_secure_rule_falco" "awscloudtrail" {
492492}` , name , name )
493493}
494494
495- func ruleFalcoCloudAWSCloudtrailWithAppend ( ) string {
496- return `
495+ func RuleFalcoCloudAWSCloudtrailWithAppend ( name string ) string {
496+ return fmt . Sprintf ( `
497497resource "sysdig_secure_rule_falco" "awscloudtrail_append" {
498498 name = "Amplify Create App"
499499 source = "awscloudtrail"
500500 append = true
501501 exceptions {
502- name = "user_name "
502+ name = "user_name_%s "
503503 fields = ["ct.user"]
504504 comps = ["="]
505505 values = jsonencode([ ["user_a"] ])
506506 }
507- }`
507+ }` , name )
508508}
509509
510510func ruleOkta (name string ) string {
You can’t perform that action at this time.
0 commit comments