diff --git a/src/main/java/jp/classmethod/aws/reboot/gradle/secretsmanager/AmazonSecretsManagerGetSecretValueTask.java b/src/main/java/jp/classmethod/aws/reboot/gradle/secretsmanager/AmazonSecretsManagerGetSecretValueTask.java index 8897395..7a514a5 100644 --- a/src/main/java/jp/classmethod/aws/reboot/gradle/secretsmanager/AmazonSecretsManagerGetSecretValueTask.java +++ b/src/main/java/jp/classmethod/aws/reboot/gradle/secretsmanager/AmazonSecretsManagerGetSecretValueTask.java @@ -72,6 +72,8 @@ public void retrieveSecretValue() { GetSecretValueRequest request = new GetSecretValueRequest().withSecretId(secretName); GetSecretValueResult result = sm.getSecretValue(request); + + destination.getParentFile().mkdirs(); try { Files.write(destination.toPath(), result.getSecretString().getBytes(StandardCharsets.UTF_8));