Actions
Bug #20776
closedCannot use file_key_value_present_option in rudderc
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
Description
Consider the following code
@reporting_logic = "weighted" { variable("cis_rhel7", "disable_ipv4_forward").string_from_command("sysctl net.ipv4.ip_forward") condition("ipv4_forward_disabled").from_variable_match("cis_rhel7.disable_ipv4_forward", """net.ipv4.ip_forward\s+=\s+0""") report("Ensure IP forwarding is disabled").if_condition("ipv4_forward_disabled_true") file("/etc/sysctl.conf").key_value_present_option("net.ipv4.ip_forward", "0", " = ", "strict") }
compiling it with
/opt/rudder/bin/rudderc technique read -i "cis_network_configuration.rd"
and uploading it results in an error
"errorDetails": "Could not create ncf technique <- MethodNotFound: Parameter 'path' for method 'file_key_value_present_option' not found when writing dsc Technique 'CIS v2.1.1' methods calls" }
it compile file_key_value_present_option with a resource parameter rather than path
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 7.0.2 to 7.0.3
Updated by Alexis Mousset over 2 years ago
- Target version changed from 7.0.3 to 7.2.0~beta1
Updated by Alexis Mousset over 2 years ago
- Subject changed from Cannot use file_key_value_present_option in rudderlang to Cannot use file_key_value_present_option in rudderc
Actions