Sha256: 3942146cd4c578801f30d69d022fd1889738887e3348743489b08924ca4465ec

Contents?: true

Size: 682 Bytes

Versions: 7

Compression:

Stored size: 682 Bytes

Contents

class TerraspacePluginAzurerm::Interfaces::Backend
  class BlobContainer < Base
    def create
      if exist?
        logger.debug "Storage Blob Container #{@container_name} already exists"
      else
        create_blob_container
      end
    end

    def exist?
      blob_container.exist?(name: @container_name)
    end

    def create_blob_container
      logger.info "Creating Storage Blob Container #{@container_name}..."
      blob_container.create(name: @container_name)
    end

   private
    def blob_container
      Armrest::Services::BlobContainer.new(storage_account: @storage_account_name, group: @resource_group_name)
    end
    memoize :blob_container
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
terraspace_plugin_azurerm-0.7.1 lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb
terraspace_plugin_azurerm-0.7.0 lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb
terraspace_plugin_azurerm-0.6.2 lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb
terraspace_plugin_azurerm-0.6.1 lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb
terraspace_plugin_azurerm-0.6.0 lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb
terraspace_plugin_azurerm-0.5.1 lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb
terraspace_plugin_azurerm-0.5.0 lib/terraspace_plugin_azurerm/interfaces/backend/blob_container.rb