Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPM 345 Application settings reserved environment #160

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@
DNB_MONITORING_S3_BUCKET = env('DNB_S3_MONITORING_BUCKET')
DNB_ARCHIVE_PROCESSED_FILES = env.bool('DNB_ARCHIVE_PROCESSED_FILES')
DNB_ARCHIVE_PATH = env('DNB_ARCHIVE_PATH', default='archive/')
AWS_ACCESS_KEY_ID = env('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = env('AWS_SECRET_ACCESS_KEY')
DEFAULT_AWS_ACCESS_KEY_ID = env('DEFAULT_AWS_ACCESS_KEY_ID')
DEFAULT_AWS_SECRET_ACCESS_KEY = env('DEFAULT_AWS_SECRET_ACCESS_KEY')

# Redis

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ class Command(BaseCommand):
s3_client = None

def __init__(self):
self.s3_client = client('s3')
self.s3_client = client(
's3',
aws_access_key_id=settings.DEFAULT_AWS_ACCESS_KEY_ID,
aws_secret_access_key=settings.DEFAULT_AWS_SECRET_ACCESS_KEY,
)

super().__init__()

Expand Down
4 changes: 2 additions & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ env =
DNB_S3_MONITORING_BUCKET=dummy-bucket
DNB_ARCHIVE_PROCESSED_FILES=False
DNB_ARCHIVE_PATH='archive/'
AWS_ACCESS_KEY_ID=fake-access-key
AWS_SECRET_ACCESS_KEY=fake-access-key-secret
DEFAULT_AWS_ACCESS_KEY_ID=fake-access-key
DEFAULT_AWS_SECRET_ACCESS_KEY=fake-access-key-secret
GOVUK_NOTIFICATIONS_API_KEY=ainaidahNgaeteghei3yooshaiyeeShi8heSie3Ba9AGhoos8eicie5lei2nahue9DaiBait5Ba4ajeiMee6Photh4alegh4Eez8Quopaith5B
CHANGE_REQUESTS_RECIPIENTS=foo@example.net,bar@example.net
ELASTIC_APM_SECRET_TOKEN=
Expand Down
4 changes: 2 additions & 2 deletions sample_env
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ALLOWED_ADMIN_IPS=127.0.0.1
ALLOWED_ADMIN_IP_RANGES=
ALLOWED_IPS=
IP_RESTRICT=
AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
DEFAULT_AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
DEFAULT_AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
REDIS_URL=redis://localhost:6379
SENTRY_DSN=
SENTRY_ENVIRONMENT=
Expand Down
4 changes: 2 additions & 2 deletions sample_env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ALLOWED_ADMIN_IPS=127.0.0.1
ALLOWED_ADMIN_IP_RANGES=
ALLOWED_IPS=
IP_RESTRICT=
AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
DEFAULT_AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
DEFAULT_AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
REDIS_URL=redis://redis:6379
SENTRY_DSN=
SENTRY_ENVIRONMENT=
Expand Down