diff --git a/infra/src/cdk-app.ts b/infra/src/cdk-app.ts index 223af9192..71389692f 100644 --- a/infra/src/cdk-app.ts +++ b/infra/src/cdk-app.ts @@ -401,6 +401,7 @@ class OrganisaatioApplicationStack extends cdk.Stack { oiva_baseurl: this.ssmSecret("OivaBaseurl"), oiva_username: this.ssmSecret("OivaUsername"), oiva_password: this.ssmSecret("OivaPassword"), + "organisaatio.tasks.datantuonti.import.bucket.name": this.ssmString("organisaatio.tasks.datantuonti.import.bucket.name", "") }, portMappings: [ { @@ -588,12 +589,12 @@ class OrganisaatioApplicationStack extends cdk.Stack { alarm.addAlarmAction(new cloudwatch_actions.SnsAction(alarmTopic)); } - ssmString(name: string): ecs.Secret { + ssmString(name: string, prefix: string = "/organisaatio/"): ecs.Secret { return ecs.Secret.fromSsmParameter( ssm.StringParameter.fromStringParameterName( this, `Param${name}`, - `/organisaatio/${name}` + `${prefix}${name}` ) ); } diff --git a/organisaatio-service/src/main/java/fi/vm/sade/organisaatio/datantuonti/DatantuontiImportService.java b/organisaatio-service/src/main/java/fi/vm/sade/organisaatio/datantuonti/DatantuontiImportService.java index 7684fc445..73ca4594d 100644 --- a/organisaatio-service/src/main/java/fi/vm/sade/organisaatio/datantuonti/DatantuontiImportService.java +++ b/organisaatio-service/src/main/java/fi/vm/sade/organisaatio/datantuonti/DatantuontiImportService.java @@ -71,7 +71,7 @@ CREATE TABLE IF NOT EXISTS datantuonti_osoite_temp( kieli text )"""; - @Value("${organisaatio.tasks.datantuonti.export.bucket-name}") + @Value("${organisaatio.tasks.datantuonti.import.bucket.name}") private String bucketName; @Transactional