@@ -1441,13 +1441,12 @@ resource "github_organization_ruleset" "test" {
14411441 Steps : []resource.TestStep {
14421442 {
14431443 Config : config ,
1444- Check : resource .ComposeTestCheckFunc (
1445- resource .TestCheckResourceAttr ("github_organization_ruleset.test" , "name" , rulesetName ),
1446- resource .TestCheckResourceAttr ("github_organization_ruleset.test" , "enforcement" , "active" ),
1447- resource .TestCheckResourceAttr ("github_organization_ruleset.test" , "bypass_actors.#" , "1" ),
1448- resource .TestCheckResourceAttr ("github_organization_ruleset.test" , "bypass_actors.0.actor_type" , "EnterpriseOwner" ),
1449- resource .TestCheckResourceAttr ("github_organization_ruleset.test" , "bypass_actors.0.bypass_mode" , "always" ),
1450- ),
1444+ ConfigStateChecks : []statecheck.StateCheck {
1445+ statecheck .ExpectKnownValue ("github_organization_ruleset.test" , tfjsonpath .New ("name" ), knownvalue .StringExact (rulesetName )),
1446+ statecheck .ExpectKnownValue ("github_organization_ruleset.test" , tfjsonpath .New ("enforcement" ), knownvalue .StringExact ("active" )),
1447+ statecheck .ExpectKnownValue ("github_organization_ruleset.test" , tfjsonpath .New ("bypass_actors" ).AtSliceIndex (0 ).AtMapKey ("actor_type" ), knownvalue .StringExact ("EnterpriseOwner" )),
1448+ statecheck .ExpectKnownValue ("github_organization_ruleset.test" , tfjsonpath .New ("bypass_actors" ).AtSliceIndex (0 ).AtMapKey ("bypass_mode" ), knownvalue .StringExact ("always" )),
1449+ },
14511450 },
14521451 },
14531452 })
0 commit comments