From 5ab6069a374caeeb2824087dae423f791e60de91 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Mon, 18 Nov 2024 13:34:01 +0000 Subject: [PATCH] feat: better error message, add pulumi_random --- cloudbender/stack.py | 9 ++++++++- pyproject.toml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cloudbender/stack.py b/cloudbender/stack.py index b5b1a25..b514a21 100644 --- a/cloudbender/stack.py +++ b/cloudbender/stack.py @@ -1059,11 +1059,18 @@ class Stack(object): if "parameters" not in settings: settings["parameters"] = {} + # hack for bug above, we support one level of nested values for now _val = pulumi_settings["config"]["{}:{}".format( self.parameters["Conglomerate"], key)] if '.' in key: - (root, leaf) = key.split('.') + try: + (root, leaf) = key.split('.') + except ValueError as e: + raise ParameterIllegalValue( + "Currently only one level hierachies within parameters are supported!" + ) + if root not in settings["parameters"]: settings["parameters"][root] = {} diff --git a/pyproject.toml b/pyproject.toml index f994a47..3dd7abe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ dependencies = [ "pulumi-aws-native==0.103.0", "pulumi-policy==1.11.0", "pulumi-command==0.10.0", + "pulumi_random==4.16.6", ] classifiers = [