Skip to content

Commit

Permalink
fixing filedatastores3 for ds profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryGeorgist committed Feb 22, 2023
1 parent ac9c071 commit 3e3b15e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/usace/wat/plugin/FileDataStoreS3.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ public Boolean Delete(String path) {

public FileDataStoreS3(DataStore ds){
AWSConfig acfg = new AWSConfig();
acfg.aws_access_key_id = System.getenv(EnvironmentVariables.AWS_ACCESS_KEY_ID);
acfg.aws_secret_access_key_id = System.getenv(EnvironmentVariables.AWS_SECRET_ACCESS_KEY);
acfg.aws_region = System.getenv(EnvironmentVariables.AWS_DEFAULT_REGION);
acfg.aws_bucket = System.getenv(EnvironmentVariables.AWS_S3_BUCKET);
acfg.aws_mock = Boolean.parseBoolean(System.getenv("S3_MOCK"));//convert to boolean;
acfg.aws_endpoint = System.getenv("S3_ENDPOINT");
acfg.aws_disable_ssl = Boolean.parseBoolean(System.getenv("S3_DISABLE_SSL"));//convert to bool?
acfg.aws_force_path_style = Boolean.parseBoolean(System.getenv("S3_FORCE_PATH_STYLE"));//convert to bool
acfg.aws_access_key_id = System.getenv(ds.getDsProfile() + EnvironmentVariables.AWS_ACCESS_KEY_ID);
acfg.aws_secret_access_key_id = System.getenv(ds.getDsProfile() + EnvironmentVariables.AWS_SECRET_ACCESS_KEY);
acfg.aws_region = System.getenv(ds.getDsProfile() + EnvironmentVariables.AWS_DEFAULT_REGION);
acfg.aws_bucket = System.getenv(ds.getDsProfile() + EnvironmentVariables.AWS_S3_BUCKET);
acfg.aws_mock = false;//Boolean.parseBoolean(System.getenv("S3_MOCK"));//convert to boolean;
//acfg.aws_endpoint = System.getenv("S3_ENDPOINT");
//acfg.aws_disable_ssl = Boolean.parseBoolean(System.getenv("S3_DISABLE_SSL"));//convert to bool?
//acfg.aws_force_path_style = Boolean.parseBoolean(System.getenv("S3_FORCE_PATH_STYLE"));//convert to bool
config = acfg;
Regions clientRegion = Regions.valueOf(config.aws_region.toUpperCase().replace("-", "_"));
try {
Expand Down

0 comments on commit 3e3b15e

Please # to comment.