We deploy our codebase to multiple environments and would like to manage configuration in site specific settings files. The attached patch allows us to override the storage containers.

Features or strongarm exportability would be nice, but there are few hurdles. Chief among them is that the ID may be different on different machines. It's not for us, so this works fine.

This module allows you to specify container settings in your settings.php file in a format similar to the following:

/**
 * Storage API settings
 *
 * Key would be container ID as appears in storage API config. Note that this
 * only makes sense for a specific type of deployment with predictable IDs. This
 * use case happens to be one of them.
 */
$conf['storage_api_container_settings'] = array(
  '1' => array(
    'path'     => 'sites/local/files/somewhere',
    'base_url' => 'sites/local/files/somewhere',
  ),
  '2' => array(
    'access_key_id'        => 'ACCESSKEYHERE',
    'secret_access_key'    => 'SECRETKEYHERE',
    'bucket'               => 'mybucket',
    'cname'                => 1,
    'reduced_redundancy'   => 0,
    'cloudfront'           => 0,
    'cloudfront_streaming' => 0,
    'location'             => '',
    'url_lifetime'         => 3601,
  ),
);
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Silicon.Valet’s picture

Perignon’s picture

Assigned: Unassigned » Perignon
Perignon’s picture

Going to have to re-roll this patch.

  • Perignon committed 231c913 on 7.x-1.x authored by Silicon.Valet
    Issue #2325149 by Silicon.Valet: Allow configuration management through...
Perignon’s picture

Status: Active » Fixed
jiv_e’s picture

Nice! Thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

seemas’s picture

Original patch does not apply on drush make.
Uploading a new one for 7.x-1.6 that works for me 100%.

Perignon’s picture

Be aware v1.6 and any version prior to 1.8 has a security flaw. It is a small one but it is worth nothing.

Perignon’s picture

I am needing this now in a project I am working on where I need to create a repeatable/testable installation. I am going to be creating a new issue that I hope can build on this functionality.

Perignon’s picture

I added this to the documentation page: https://www.drupal.org/node/420786