Topics

[ANN] Resource API v1.1 Release

David Schmitt
 

Hi all,

We're pleased to announce that version 1.1 of the Resource API has been released yesterday.

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 to deploy it in your infrastructure.

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

  • Arrays are now fully supported as data types (v1.1.0)
  • Read only and init only attributes have that status now fully enforced (v1.0.3)

The new release also contains the following notable bugfixes:

  • PDK-911: handling of ensure values changed to use strings: Previous to v1.0.3, in some cases ensure values of 'absent' and 'present' would be transformed to ruby symbols before passing it on to the provider. This behavior was inconsistent with both puppet and other Enums in the Resource API, that would always use strings. Providers now need to return and accept the strings 'absent' and 'present' instead of the :absent and :present symbols.
  • PDK-919: Boolean attributes now work in all cases: In some cases puppet can ignore true boolean values. The Resource API now works around the issue in a transparent way that requires no change to providers.

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

--