Project

General

Profile

Actions

Bug #20776

closed

Cannot use file_key_value_present_option in rudderc

Added by Nicolas CHARLES about 2 years ago. Updated over 1 year ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
rudderc
Target version:
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

Actions #1

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 7.0.2 to 7.0.3
Actions #2

Updated by Alexis Mousset almost 2 years ago

  • Target version changed from 7.0.3 to 7.2.0~beta1
Actions #3

Updated by Alexis Mousset almost 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 #4

Updated by Alexis Mousset over 1 year ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF