diff --git a/config.yaml b/config.yaml index 31c6571..079b09a 100755 --- a/config.yaml +++ b/config.yaml @@ -23,12 +23,13 @@ rabbitmq: storage: backend: $STORAGE_BACKEND|s3 # The type of storage to use {s3, azure} - bucket: "STORAGE_BUCKET_NAME|STORAGE_AZURECONTAINERNAME|pyinfra-test-bucket" # The bucket / container to pull files specified in queue requests from + bucket: "STORAGE_BUCKET_NAME|STORAGE_AZURECONTAINERNAME|pyinfra-test-bucket2" # The bucket / container to pull files specified in queue requests from s3: endpoint: $STORAGE_ENDPOINT|"http://127.0.0.1:9000" access_key: $STORAGE_KEY|root secret_key: $STORAGE_SECRET|password + region: $STORAGE_REGION|"eu-west-1" azure: connection_string: $STORAGE_AZURECONNECTIONSTRING|"DefaultEndpointsProtocol=https;AccountName=iqserdevelopment;AccountKey=4imAbV9PYXaztSOMpIyAClg88bAZCXuXMGJG0GA1eIBpdh2PlnFGoRBnKqLy2YZUSTmZ3wJfC7tzfHtuC6FEhQ==;EndpointSuffix=core.windows.net" diff --git a/pyinfra/storage/clients/s3.py b/pyinfra/storage/clients/s3.py index 943d88c..f130989 100644 --- a/pyinfra/storage/clients/s3.py +++ b/pyinfra/storage/clients/s3.py @@ -32,4 +32,9 @@ def get_s3_client(params=None) -> Minio: if not params: params = CONFIG.storage.s3 - return Minio(**parse_endpoint(params.endpoint), access_key=params.access_key, secret_key=params.secret_key) + return Minio( + **parse_endpoint(params.endpoint), + access_key=params.access_key, + secret_key=params.secret_key, + region=params.region, + ) diff --git a/test/config.yaml b/test/config.yaml index 72bddfc..d404715 100644 --- a/test/config.yaml +++ b/test/config.yaml @@ -3,11 +3,13 @@ storage: endpoint: "http://127.0.0.1:9000" access_key: root secret_key: password + region: null aws: endpoint: https://s3.amazonaws.com access_key: AKIA4QVP6D4LCDAGYGN2 secret_key: 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 + region: $STORAGE_REGION|"eu-west-1" azure: connection_string: "DefaultEndpointsProtocol=https;AccountName=iqserdevelopment;AccountKey=4imAbV9PYXaztSOMpIyAClg88bAZCXuXMGJG0GA1eIBpdh2PlnFGoRBnKqLy2YZUSTmZ3wJfC7tzfHtuC6FEhQ==;EndpointSuffix=core.windows.net" diff --git a/test/unit_tests/conftest.py b/test/unit_tests/conftest.py index 92d78cf..c614ee0 100644 --- a/test/unit_tests/conftest.py +++ b/test/unit_tests/conftest.py @@ -28,7 +28,7 @@ logger.setLevel(logging.DEBUG) @pytest.fixture(scope="session") def bucket_name(): - return "pyinfra-test-bucket" + return "pyinfra-test-bucket2" @pytest.fixture