Closed jrdbarnes closed 2 years ago
This is the same issue as https://github.com/puppetlabs/Puppet.Dsc/issues/214, not sure which project is correct for this bug.
Hey @jrdbarnes , is this still an issue for you?
Hey @jrdbarnes I am going to close this issue. As you mentioned it is the same as #214 which has now been resolved.
If you disagree with my decision please feel free to reopen and let me know. Thank you for taking the time to raise this issue.
Describe the Bug
A parameter with
mandatory_for_get: true
is not passed to theGet-TargetResource
call.Expected Behavior
With the configuration defined below,
dsc_endpointtype
should be passed to theGet-TargetResource
for execution.Steps to Reproduce
With the following valid puppet resource definition, and dsc-sqlserverdsc module.
Install SQL on a Windows Server 2019 OS and run puppet.
Environment
Additional Context
The parameter definition from the Resource Definition inside the module:
Abbreviated Debug logs:
Debug: dsc_sqlendpoint: Collecting data from the DSC Resource Debug: dsc_sqlendpoint: retrieving {:name=>"HADREndpoint", :dsc_instancename=>"MSSQLSERVER", :dsc_endpointname=>"HADR"} Debug: dsc_sqlendpoint: invocable_resource: {:parameters=>{:dsc_instancename=>{:value=>"MSSQLSERVER", :mof_type=>"String", :mof_is_embedded=>false}, :dsc_endpointname=>{:value=>"HADR", :mof_type=>"String", :mof_is_embedded=>false}}, :name=>"dsc_sqlendpoint", :dscmeta_resource_friendly_name=>"SqlEndpoint", :dscmeta_resource_name=>"DSC_SqlEndpoint", :dscmeta_resource_implementation=>"MOF", :dscmeta_module_name=>"SqlServerDsc", :dscmeta_module_version=>"15.2.0", :dsc_invoke_method=>"get", :vendored_modules_path=>"C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet_x/sqlserverdsc/dsc_resources", :attributes=>nil} Debug: dsc_sqlendpoint: Script: ... Debug: dsc_sqlendpoint: raw data received: {"rebootrequired"=>false, "indesiredstate"=>false, "errormessage"=>"Could not find mandatory property EndpointType. Add this property and try again."} Error: dsc_sqlendpoint: Could not find mandatory property EndpointType. Add this property and try again. Error: /Stage[main]/Profile::Sqlavg/Dsc_sqlendpoint[HADREndpoint]: Could not evaluate: undefined method `[]' for nil:NilClass