Skip to content

Commit

Permalink
set hcs specific variables
Browse files Browse the repository at this point in the history
  • Loading branch information
maskarb committed Jan 10, 2025
1 parent 7b3a983 commit 4744325
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions koku/koku/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,19 @@
S3_BUCKET_NAME = CONFIGURATOR.get_object_store_bucket(REQUESTED_BUCKET)
S3_ACCESS_KEY = CONFIGURATOR.get_object_store_access_key(REQUESTED_BUCKET)
S3_SECRET = CONFIGURATOR.get_object_store_secret_key(REQUESTED_BUCKET)
# HCS
S3_HCS_BUCKET_NAME = CONFIGURATOR.get_object_store_bucket(REQUESTED_BUCKET)
S3_HCS_ACCESS_KEY = CONFIGURATOR.get_object_store_access_key(REQUESTED_BUCKET)
S3_HCS_SECRET = CONFIGURATOR.get_object_store_secret_key(REQUESTED_BUCKET)
S3_HCS_REGION = CONFIGURATOR.get_object_store_region(REQUESTED_BUCKET)
S3_HCS_ENDPOINT = CONFIGURATOR.get_object_store_endpoint()
# ROS
S3_ROS_BUCKET_NAME = CONFIGURATOR.get_object_store_bucket(REQUESTED_ROS_BUCKET)
S3_ROS_ACCESS_KEY = CONFIGURATOR.get_object_store_access_key(REQUESTED_ROS_BUCKET)
S3_ROS_SECRET = CONFIGURATOR.get_object_store_secret_key(REQUESTED_ROS_BUCKET)
S3_ROS_REGION = CONFIGURATOR.get_object_store_region(REQUESTED_ROS_BUCKET)
S3_ROS_ENDPOINT = CONFIGURATOR.get_object_store_endpoint()
# SUBS
S3_SUBS_BUCKET_NAME = CONFIGURATOR.get_object_store_bucket(REQUESTED_SUBS_BUCKET)
S3_SUBS_ACCESS_KEY = CONFIGURATOR.get_object_store_access_key(REQUESTED_SUBS_BUCKET)
S3_SUBS_SECRET = CONFIGURATOR.get_object_store_secret_key(REQUESTED_SUBS_BUCKET)
Expand Down
6 changes: 3 additions & 3 deletions koku/masu/util/aws/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,9 @@ def copy_local_hcs_report_file_to_s3_bucket(
if s3_path and settings.ENABLE_S3_ARCHIVING:
LOG.info(f"copy_local_HCS_report_file_to_s3_bucket: {s3_path} {full_file_path}")
s3_resource = get_s3_resource(
access_key=settings.S3_ACCESS_KEY,
secret_key=settings.S3_SECRET,
region=settings.S3_REGION,
access_key=settings.S3_HCS_ACCESS_KEY,
secret_key=settings.S3_HCS_SECRET,
region=settings.S3_HCS_REGION,
endpoint_url=settings.S3_HCS_ENDPOINT,
)
with open(full_file_path, "rb") as fin:
Expand Down

0 comments on commit 4744325

Please sign in to comment.