All resources and providers in Chef Provisioning AWS must fulfill the [common acceptance criteria] (https://github.com/chef/chef-provisioning/blob/master/CONTRIBUTING.md) for all Chef Provisioning projects. In addition, Chef Provisioning AWS has the following additional acceptance criteria:
- When an AWS object supports dependent objects, the resource must also have a
:purge
action which destroys all dependent AWS objects, as well as the specified object. - This is primarily for development purposes, and should be documented as such.
- The action must print a warning when called, so that users know that the resource does not properly clean up data bag references to purged objects.
- If an object can be tagged in the Amazon Ruby SDK, the resource must have a convergent
aws_tags
attribute. - This is traditionally done by extending the resource with the
Chef::Provisioning::AWSDriver::AWSTaggable
module and adding aconverge_tags
method to the provider which leverages theAWSTagger
class. - If the AWS object is not identified primarily by its name but instead by an auto generated ID, the resource must store a mapping between the resource name and the AWS object ID.
- This is to support
aws_instance 'my instance'
being able to converge the instance'i-12345678'
after the first chef run when the id is generated by AWS. - Any AWS resource that referes to another AWS resource (EG,
subnet
has avpc
attribute) should be able to accept a resource name, the AWS object identifier (if it is different from the resource name), the AWS object or a resource object as the attribute value.
See https://github.com/chef/chef-provisioning/blob/master/CONTRIBUTING.md#release-process