Class: Convection::Model::Template::Resource::S3Bucket
Overview
Instance Attribute Summary
#exist, #name, #parent, #properties, #resource_attributes, #template
Instance Method Summary
collapse
#immutable_metadata, #render_tags, #tag, #tags
#as_attribute, attach_method, #deletion_policy, #depends_on, #initialize, properties, property, #property, #reference, type, #type, #with_output
#condition, #render_condition
#_terraform_module_dir_to_flag, #_terraform_module_flag_to_dir, attach_resource, attach_resource_collection, resource_collection_dsl_methods, resource_dsl_methods
#camel_case, included, method_name, #screaming_snake_case, #snake_case
#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_import_value, #fn_not, #fn_or, #fn_ref, #fn_sub, #get_att, #get_azs, included, #join, mixers, #select
Instance Method Details
#access_control ⇒ Object
#access_control(value) ⇒ Object
21
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 21
property :access_control, 'AccessControl'
|
#bucket_name ⇒ Object
#bucket_name(value) ⇒ Object
20
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 20
property :bucket_name, 'BucketName'
|
#cors_configuration ⇒ Object
#cors_configuration(value) ⇒ Object
22
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 22
property :cors_configuration, 'CorsConfiguration'
|
#cors_configurationm(*args) ⇒ Object
36
37
38
39
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 36
def cors_configurationm(*args)
warn 'DEPRECATED: "cors_configurationm" is deprecated. Please use "cors_configuration" instead. https://github.com/rapid7/convection/pull/135'
cors_configuration(*args)
end
|
#lifecycle_configuration ⇒ Object
#lifecycle_configuration(value) ⇒ Object
23
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 23
property :lifecycle_configuration, 'LifecycleConfiguration'
|
#logging_configuration ⇒ Object
#logging_configuration(value) ⇒ Object
24
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 24
property :logging_configuration, 'LoggingConfiguration'
|
#notification_configuration ⇒ Object
#notification_configuration(value) ⇒ Object
25
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 25
property :notification_configuration, 'NotificationConfiguration'
|
#render(*args) ⇒ Object
77
78
79
80
81
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 77
def render(*args)
super.tap do |resource|
render_tags(resource)
end
end
|
#replication_configuration ⇒ Object
#replication_configuration(value) ⇒ Object
26
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 26
property :replication_configuration, 'ReplicationConfiguration'
|
53
54
55
56
57
58
59
60
61
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 53
def terraform_import_commands(module_path: 'root')
commands = ['# Run the following commands to import your infrastructure into terraform management.', '# ensure :module_path is set correctly', '']
module_prefix = "#{module_path}." unless module_path == 'root'
commands << '# Import s3 bucket and s3 bucket policy: '
commands << "terraform import #{module_prefix}aws_s3_bucket.#{name.underscore} #{stack.resources[name].physical_resource_id}"
commands << ''
commands
end
|
#to_hcl_json ⇒ Object
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 63
def to_hcl_json(*)
bucket_resource = {
name.underscore => {
bucket: stack.resources[name].physical_resource_id,
acl: 'private',
force_destroy: false
}
}
data = [{ aws_region: { current: { current: true } } }]
vars = [{ cloud: { description: 'The cloud name for this resource.' } }]
{ resource: [{ aws_s3_bucket: bucket_resource }], data: data, variable: vars }.to_json
end
|
#versioning_configuration ⇒ Object
#versioning_configuration(value) ⇒ Object
27
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 27
property :versioning_configuration, 'VersioningConfiguration'
|
#website_configuration ⇒ Object
#website_configuration(value) ⇒ Object
28
|
# File 'lib/convection/model/template/resource/aws_s3_bucket.rb', line 28
property :website_configuration, 'WebsiteConfiguration'
|