diff --git a/pyinfra/config.py b/pyinfra/config.py index 89fbce3..a08f5ab 100644 --- a/pyinfra/config.py +++ b/pyinfra/config.py @@ -49,6 +49,9 @@ class Config(object): # Password for s3 storage self.storage_secret = read_from_environment("STORAGE_SECRET", "password") + # Region for s3 storage + self.storage_region = read_from_environment("STORAGE_REGION", "eu-central-1") + # Connection string for Azure storage self.storage_azureconnectionstring = read_from_environment( "STORAGE_AZURECONNECTIONSTRING", "DefaultEndpointsProtocol=..." diff --git a/pyinfra/storage/adapters/s3.py b/pyinfra/storage/adapters/s3.py index 16e20ae..5f2f830 100644 --- a/pyinfra/storage/adapters/s3.py +++ b/pyinfra/storage/adapters/s3.py @@ -94,7 +94,7 @@ def get_s3_storage(config: Config): **_parse_endpoint(config.storage_endpoint), access_key=config.storage_key, secret_key=config.storage_secret, - # FIXME Is this still needed? Check and if yes, add it to config - # region=config.region, + # This is relevant for running on s3 + region=config.storage_region, ) )