cdk deploy fails
ekimike opened this issue · 2 comments
What's going wrong and not working?
for Chapter 5. Page 72 says we can run CDK deploy just with the required code but at the end, the command fails because it starts failing on Service.java (74), then. SpringBootApplicationStack.java(32) both of them from the stratospheric maven library. It seems it fails because on SpringBootApplicationStack.java line 26, the fifth argument building the Network.NetworkInputParameters() is using that empty constructor, which means we are not going to use SslCertifcateArn:
Caused by: java.util.NoSuchElementException: No value present
at java.util.Optional.get (Optional.java:141)
at dev.stratospheric.cdk.Service.<init> (Service.java:74)
at dev.stratospheric.cdk.SpringBootApplicationStack.<init> (SpringBootApplicationStack.java:32)
at com.myorg.MyCdkApp.main (MyCdkApp.java:29)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
at java.lang.Thread.run (Thread.java:832)
Line 29 form MyCdkApp.java is
new SpringBootApplicationStack(
app,
"SpringBootApplication",
makeEnv(accountId, region), //line 29
"docker.io/stratospheric/todo-app-v1:latest"
);
Expected outcome
Cloudformation built from CDK
Thanks for reporting this issue. This essentially the same issue as the one described here: #59
The issue is caused by the HTTPS listener not yet being present at that point, which leads to the exception mentioned above when trying to access httpsListenerArn
in line 74 of Service.java
.
We're currently working on a consistent solution.