From 09c2340f6c7230fb4d713e0f8acd5a5bf39c6b81 Mon Sep 17 00:00:00 2001 From: Steven Davidovitz Date: Fri, 17 Mar 2023 10:15:03 -0700 Subject: [PATCH] add warnings and exceptions for agent template functionality (#135) --- cdk/domino_cdk/config/base.py | 10 ++++++++-- cdk/domino_cdk/domino_stack.py | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cdk/domino_cdk/config/base.py b/cdk/domino_cdk/config/base.py index 5d22e1b1..64b847ab 100644 --- a/cdk/domino_cdk/config/base.py +++ b/cdk/domino_cdk/config/base.py @@ -66,7 +66,10 @@ def from_0_0_0(c: dict): efs = EFS.from_0_0_0(efs) # Install is no longer supported - c.pop("install", None) + if c.pop("install", None): + raise ValueError( + "\"install\" is no longer a supported configurable, please directly modify the install configuration post-provision" + ) acm = c.pop("acm", None) if acm is not None: @@ -106,7 +109,10 @@ def from_0_0_1(c: dict): efs = EFS.from_0_0_0(efs) # Install is no longer supported - c.pop("install", None) + if c.pop("install", None): + raise ValueError( + "\"install\" is no longer a supported configurable, please directly modify the install configuration post-provision" + ) acm = c.pop("acm", None) if acm is not None: diff --git a/cdk/domino_cdk/domino_stack.py b/cdk/domino_cdk/domino_stack.py index b29b5a78..22ef85e2 100644 --- a/cdk/domino_cdk/domino_stack.py +++ b/cdk/domino_cdk/domino_stack.py @@ -146,4 +146,10 @@ def generate_outputs(self): value=r53_owner_id, ) + cdk.CfnOutput( + self, + "agent_config", + value="\"agent_config\" is no longer supported, please manually create your install configuration based on the provisioning outputs", + ) + cdk.CfnOutput(self, "cdk_config", value=DominoCdkUtil.ruamel_dump(self.cfg.render(True)))