Class: TerraspacePluginAzurerm::Interfaces::Backend::BlobContainer
- Inherits:
-
Base
- Object
- Base
- TerraspacePluginAzurerm::Interfaces::Backend::BlobContainer
show all
- Defined in:
- lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb
Instance Method Summary
collapse
Methods inherited from Base
#azure_info, #config, #initialize, #logger
Instance Method Details
#create ⇒ Object
3
4
5
6
7
8
9
|
# File 'lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb', line 3
def create
if exist?
logger.debug "Storage Blob Container #{@container_name} already exists"
else
create_blob_container
end
end
|
#create_blob_container ⇒ Object
15
16
17
18
|
# File 'lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb', line 15
def create_blob_container
logger.info "Creating Storage Blob Container #{@container_name}..."
blob_container.create(name: @container_name)
end
|
#exist? ⇒ Boolean
11
12
13
|
# File 'lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb', line 11
def exist?
blob_container.exist?(name: @container_name)
end
|