Skip to content

Commit

Permalink
(CAT-1869) - Add dsc_timeout param to all dsc resources
Browse files Browse the repository at this point in the history
This commit adds the dsc_timeout param to all dsc resources generated by
Puppet.Dsc. This allows the user to set a configurable amount of time,
in seconds, in which puppet will wait for the dsc invocation to finish.

If the timeout passes, and DSC has not returned, the powershell process
defined in puppetlabs-pwshlib's dsc_base_provider, will quit the
operation and move on.
  • Loading branch information
jordanbreen28 committed Jun 11, 2024
1 parent e68e1e3 commit 53bec23
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Puppet.Dsc/internal/functions/Get-TypeContent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ Puppet::ResourceApi.register_type(
behaviour: :parameter,
default: 'property',
},
dsc_timeout: {
type: 'Optional[Integer]',
desc: 'The maximum time in seconds to wait for the DSC resource to complete.',
behaviour: :parameter,
},
$((Get-TypeParameterContent -ParameterInfo $Resource.ParameterInfo) -join "`n")
},
)
Expand Down

0 comments on commit 53bec23

Please sign in to comment.