diff --git a/gradle.properties b/gradle.properties index dcbfb7e6..5cecfd6f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,4 +16,4 @@ group=com.nike artifactId=cerberus-lifecycle-cli -version=4.6.1 +version=4.6.2 diff --git a/src/main/java/com/nike/cerberus/cli/EnvironmentConfigToArgsMapper.java b/src/main/java/com/nike/cerberus/cli/EnvironmentConfigToArgsMapper.java index eda17e92..11aa218a 100644 --- a/src/main/java/com/nike/cerberus/cli/EnvironmentConfigToArgsMapper.java +++ b/src/main/java/com/nike/cerberus/cli/EnvironmentConfigToArgsMapper.java @@ -268,8 +268,10 @@ private static List getCreateDatabaseCommandArgs(EnvironmentConfig confi args.addOption(CreateDatabaseCommand.INSTANCE_CLASS_LONG_ARG, config.getPrimaryRegionConfig().getRds().get().getSize()); - args.addOption(CreateDatabaseCommand.RESTORE_FROM_SNAPSHOT, - config.getPrimaryRegionConfig().getRds().get().getDbClusterIdentifier()); + String snapshotIdentifier = config.getPrimaryRegionConfig().getRds().get().getDbClusterIdentifier(); + if (StringUtils.isNotBlank(snapshotIdentifier)) { + args.addOption(CreateDatabaseCommand.RESTORE_FROM_SNAPSHOT, snapshotIdentifier); + } } args.addAll(getGlobalTags(config)); return args.build();