[ANN] Resource API v1.4.0 Release

David Schmitt

Hi folks,

We're pleased to announce that version 1.4.0 of the Resource API is being released today.

The Resource API provides a simple way to create new native resources in the form of types and providers for Puppet. It is provided as a Ruby gem to be referenced within modules. Support for it has been included as an experimental feature in version 1.4 of the Puppet Development Kit (pdk new provider). Use the resource_api module or the puppet 6 nightly packages to deploy it in your infrastructure.

The new release of the Resource API provides the following enhancements:

  • Purging with resources { 'your_type': purge => true } works now for Resource API types. This allows users of your type to clean up everything that is not managed by the current catalog. (PDK-1007)
  • Enhanced validation for developers: the Resource API now checks return values from get() against the type's definition. This aids in finding bugs in the provider itself earlier and can be turned on and off through puppet's --strict setting. (PDK-917)
  • To make device-based code better re-usable, the SimpleDevice class now also takes configuration as a Hash. (#96)

The new release also contains the following notable bugfixes:

  • Exception handling during batch operations has been fixed to show all stack traces for better debugability (#101)
  • Empty (nil) attribute values are not printed from puppet resource (#100)
  • Improved error messages on data type errors in the type definition (PDK-996)

See the CHANGELOG for a full list of changes

We encourage all module developers to review the Resource API and use it when creating types and providers. For reference, there is an example of its usage in a branch of the apt module.

Please let us know of your experiences with the Resource API, either here, on Slack (#forge-modules), or on the github repo.

Thanks, David Schmitt & David Armstrong


Join voxpupuli@groups.io to automatically receive all group messages.