Skip to content

Commit

Permalink
Fix: Panic on data source wiz_cloud_configuration_rules (#33)
Browse files Browse the repository at this point in the history
* fix panic on data wiz_cloud_configuration_rules if a returned rule does not have a control

* disabled github action `tests` on push
  • Loading branch information
gramsa49 authored Oct 27, 2022
1 parent f9bdeec commit 1f06646
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
pull_request:
paths-ignore:
- 'README.md'
push:
paths-ignore:
- 'README.md'
jobs:
# ensure the code builds...
build:
Expand Down
4 changes: 3 additions & 1 deletion internal/provider/data_source_cloud_configuration_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,9 @@ func flattenCloudConfigurationRules(ctx context.Context, nodes *[]*vendor.CloudC
ruleMap["builtin"] = *b.Builtin
ruleMap["opa_policy"] = b.OPAPolicy
ruleMap["function_as_control"] = *b.FunctionAsControl
ruleMap["control_id"] = b.Control.ID
if b.Control != nil {
ruleMap["control_id"] = b.Control.ID
}
ruleMap["graph_id"] = b.GraphID
ruleMap["has_auto_remediation"] = *b.HasAutoRemediation
ruleMap["remediation_instructions"] = b.RemediationInstructions
Expand Down

0 comments on commit 1f06646

Please sign in to comment.