From 54d691feeacee660ccce1687d86661a5e9d039a4 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Mon, 11 Nov 2024 12:37:49 -0300 Subject: [PATCH] move ami_id attrs to private --- src/_nebari/stages/infrastructure/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/_nebari/stages/infrastructure/__init__.py b/src/_nebari/stages/infrastructure/__init__.py index c19b4d9a60..016f8d3d65 100644 --- a/src/_nebari/stages/infrastructure/__init__.py +++ b/src/_nebari/stages/infrastructure/__init__.py @@ -135,8 +135,11 @@ class AWSAmiTypes(str, enum.Enum): class AWSNodeLaunchTemplate(schema.Base): + class Config: + underscore_attrs_are_private = True + pre_bootstrap_command: Optional[str] = None - ami_id: Optional[str] = None + _ami_id: Optional[str] = None class AWSNodeGroupInputVars(schema.Base): @@ -155,7 +158,7 @@ class AWSNodeGroupInputVars(schema.Base): def construct_aws_ami_type(gpu_enabled: bool, launch_template: AWSNodeLaunchTemplate): """Construct the AWS AMI type based on the provided parameters.""" - if launch_template and launch_template.ami_id: + if launch_template and launch_template._ami_id: return "CUSTOM" if gpu_enabled: