0.0
No commit activity in last 3 years
No release in over 3 years
Simple module to get current scaleway data project and region
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

ScalewayData

Simple library to get current scaleway data like project and region.

Installation

Add this line to your application's Gemfile:

gem 'scaleway_data'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install scaleway_data

Usage

ScalewayData.organization
ScalewayData.project
ScalewayData.region
ScalewayData.zone

Precedence

This library will return project, region and zone info using different sources with this precedence:

  1. Environment variables: SCW_DEFAULT_ORGANIZATION_ID, SCW_DEFAULT_PROJECT_ID, SCW_DEFAULT_REGION, SCW_DEFAULT_ZONE
  2. Defaults: region=fr-par and zone=fr-par-1

1. Environment variables

The environment variables take the highest precedence:

SCW_DEFAULT_ORGANIZATION_ID, SCW_DEFAULT_PROJECT_ID, SCW_DEFAULT_REGION, SCW_DEFAULT_ZONE

2. Defaults

The library will fallback to default values when it's unable to lookup the region and zone. The default values are:

region=fr-par
zone=fr-par-1

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/synalabs/scaleway_data.