Skip to content

Instantly share code, notes, and snippets.

@ringods
Created February 5, 2014 20:27
Show Gist options
  • Save ringods/8832354 to your computer and use it in GitHub Desktop.
Save ringods/8832354 to your computer and use it in GitHub Desktop.
NameError with s3_file as a full fledged resource/provider loaded from the cookbook's libraries folder
class Chef
class Resource
class S3
class File < Chef::Resource
def initialize(name, run_context=nil)
super
@resource_name = :s3_file
@provider = Chef::Provider::S3::File
@action = :create
end
end
end
end
end
s3_file '/tmp/myfile.tar.gz' do
remote_path '/api/myfile.tar.gz'
bucket 'mybucket'
aws_access_key_id 'ACCESS_KEY'
aws_secret_access_key 'SECRET_KEY'
mode '0644'
action :create
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment