Class: Bauble::Resources::S3Bucket
- Defined in:
- lib/bauble/resources/s3_bucket.rb
Overview
S3 bucket
Instance Attribute Summary collapse
-
#force_destroy ⇒ Object
Returns the value of attribute force_destroy.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Resource
Instance Method Summary collapse
- #bundle ⇒ Object
-
#initialize(app, name: 'bauble-bucket', force_destroy: false) ⇒ S3Bucket
constructor
A new instance of S3Bucket.
- #synthesize ⇒ Object
Methods inherited from Resource
Constructor Details
#initialize(app, name: 'bauble-bucket', force_destroy: false) ⇒ S3Bucket
Returns a new instance of S3Bucket.
12 13 14 15 16 |
# File 'lib/bauble/resources/s3_bucket.rb', line 12 def initialize(app, name: 'bauble-bucket', force_destroy: false) super(app) @name = name @force_destroy = force_destroy end |
Instance Attribute Details
#force_destroy ⇒ Object
Returns the value of attribute force_destroy.
10 11 12 |
# File 'lib/bauble/resources/s3_bucket.rb', line 10 def force_destroy @force_destroy end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/bauble/resources/s3_bucket.rb', line 10 def name @name end |
Instance Method Details
#bundle ⇒ Object
30 31 32 |
# File 'lib/bauble/resources/s3_bucket.rb', line 30 def bundle true end |
#synthesize ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bauble/resources/s3_bucket.rb', line 18 def synthesize { @name => { 'type' => 'aws:s3:Bucket', 'properties' => { 'bucket' => resource_name(@name), 'forceDestroy' => @force_destroy } } } end |