From 474432560f15af758a16de7e8f5de9dbec326a45 Mon Sep 17 00:00:00 2001 From: maskarb Date: Fri, 10 Jan 2025 14:05:47 -0500 Subject: [PATCH] set hcs specific variables --- koku/koku/settings.py | 7 +++++++ koku/masu/util/aws/common.py | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/koku/koku/settings.py b/koku/koku/settings.py index 70dc9f6cec..76396b5c09 100644 --- a/koku/koku/settings.py +++ b/koku/koku/settings.py @@ -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) diff --git a/koku/masu/util/aws/common.py b/koku/masu/util/aws/common.py index 9537237c00..11daa5165a 100644 --- a/koku/masu/util/aws/common.py +++ b/koku/masu/util/aws/common.py @@ -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: