Skip to content

Commit d86fdd3

Browse files
Removed Post Provision Invocation Points (#397)
1 parent 78d1071 commit d86fdd3

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

src/main/java/software/amazon/cloudformation/HookAbstractWrapper.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,6 @@ private ProgressEvent<TargetT, CallbackT> processInvocation(final JSONObject raw
226226
throw new TerminalException("Invalid request object received. Target Model can not be null.");
227227
}
228228

229-
if (request.getActionInvocationPoint() == HookInvocationPoint.UPDATE_POST_PROVISION) {
230-
if (request.getRequestData().getTargetModel().get("PreviousResourceProperties") == null) {
231-
throw new TerminalException("Invalid hook invocation request object received");
232-
}
233-
}
234-
235229
// TODO: Include hook schema validation here after schema is finalized
236230

237231
try {

src/main/java/software/amazon/cloudformation/HookInvocationPoint.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@
1616

1717
public enum HookInvocationPoint {
1818
CREATE_PRE_PROVISION("PreCreate"),
19-
CREATE_POST_PROVISION("PostCreate"),
2019
UPDATE_PRE_PROVISION("PreUpdate"),
21-
UPDATE_POST_PROVISION("PostUpdate"),
22-
DELETE_PRE_PROVISION("PreDelete"),
23-
DELETE_POST_PROVISION("PostDelete");
20+
DELETE_PRE_PROVISION("PreDelete");
2421

2522
private final String shortName;
2623

src/test/java/software/amazon/cloudformation/HookWrapperTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,9 +880,8 @@ public void invokeHandler_with_invalid_actionInvocationPoint_returnsFailure() th
880880

881881
// verify output response
882882
verifyHandlerResponse(out,
883-
HookProgressEvent.<TestContext>builder().clientRequestToken("123456").hookStatus(HookStatus.FAILED)
884-
.errorCode(HandlerErrorCode.InternalFailure).hookStatus(HookStatus.FAILED)
885-
.message("Invalid hook invocation request object received").build());
883+
HookProgressEvent.<TestContext>builder().hookStatus(HookStatus.FAILED).errorCode(HandlerErrorCode.InternalFailure)
884+
.hookStatus(HookStatus.FAILED).message("Invalid hook invocation request object received").build());
886885
}
887886
}
888887

0 commit comments

Comments
 (0)