Type/Provider for files from s3
I am trying to create a custom type/provider to handle pulling files down from s3, while utilizing the etag value to check if the file on disk matches what is in s3. Sometimes the ETag is the md5, but in the case of multipart uploads it is a different value (The md5 of each part, concat together and md5'd with a -#, where # is the number of parts).
I have a question about some Types/Provider fundamentals. Is it possible to extend/subclass the existing file type/provider, and supply my own values?
e.g. what I would like to do is have the ability to detect if the source begins with s3://, and if so handle fetching the file, and otherwise let it behave like normal. I would like to pass the fetched file as a 'source' to the base file resource, and allow it to handle all of the other bits... ensure present/absent, setting file mode, owner, etc..
I also would like to know if there are ways to override the file resource to use something other than md5 for cataloging. If I was able to filebucket/catalog the file with the etag, or some combo of the md5 and the etag, I would be able to use that as a part of the 'exists?' method in ensurable.
Thanks in advance for your help. It would be really nice if a resource similar to what I'm describing would be made available in one of the puppet supported/approved gems, if not as a base type, or a modification of the built in file resource, but until then I get to play in types/provider land!