Skip to content

Commit

Permalink
Fixed a problem when the clean up code doesn't clean everything prope…
Browse files Browse the repository at this point in the history
…rly between runs. (#571)
  • Loading branch information
jbainbridgesysdig authored Nov 18, 2024
1 parent 3fbeb1d commit 2249b87
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions sysdig/resource_sysdig_secure_rule_falco_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func TestRuleFalcoCloudAWSCloudtrail(t *testing.T) {
func TestRuleFalcoCloudAWSCloudtrailAppend(t *testing.T) {
steps := []resource.TestStep{
{
Config: ruleFalcoCloudAWSCloudtrailWithAppend(),
Config: RuleFalcoCloudAWSCloudtrailWithAppend(randomString()),
},
}
runTest(steps, t)
Expand Down Expand Up @@ -449,18 +449,18 @@ resource "sysdig_secure_rule_falco" "falco_rule_with_exceptions" {
}

func existingFalcoRuleWithExceptions(name string) string {
return `
return fmt.Sprintf(`
resource "sysdig_secure_rule_falco" "attach_to_cluster_admin_role_exceptions" {
name = "Terminal shell in container" # Sysdig-provided
append = true
exceptions {
name = "proc_name"
name = "proc_name_%s"
fields = ["proc.name"]
comps = ["in"]
values = jsonencode([["sh"]])
}
}`
}`, name)
}

func ruleFalcoTerminalShellWithMinimumEngineVersion(name string) string {
Expand Down Expand Up @@ -492,19 +492,19 @@ resource "sysdig_secure_rule_falco" "awscloudtrail" {
}`, name, name)
}

func ruleFalcoCloudAWSCloudtrailWithAppend() string {
return `
func RuleFalcoCloudAWSCloudtrailWithAppend(name string) string {
return fmt.Sprintf(`
resource "sysdig_secure_rule_falco" "awscloudtrail_append" {
name = "Amplify Create App"
source = "awscloudtrail"
append = true
exceptions {
name = "user_name"
name = "user_name_%s"
fields = ["ct.user"]
comps = ["="]
values = jsonencode([ ["user_a"] ])
}
}`
}`, name)
}

func ruleOkta(name string) string {
Expand Down

0 comments on commit 2249b87

Please sign in to comment.