Skip to content

Commit 87ed92b

Browse files
authored
Set launch_template.ami_id attrs to private (#2842)
2 parents 1c2f8a2 + bf62489 commit 87ed92b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/_nebari/stages/infrastructure/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import tempfile
99
from typing import Annotated, Any, Dict, List, Literal, Optional, Tuple, Type, Union
1010

11-
from pydantic import ConfigDict, Field, field_validator, model_validator
11+
from pydantic import ConfigDict, Field, PrivateAttr, field_validator, model_validator
1212

1313
from _nebari import constants
1414
from _nebari.provider import terraform
@@ -136,7 +136,7 @@ class AWSAmiTypes(str, enum.Enum):
136136

137137
class AWSNodeLaunchTemplate(schema.Base):
138138
pre_bootstrap_command: Optional[str] = None
139-
ami_id: Optional[str] = None
139+
_ami_id: Optional[str] = PrivateAttr(default=None)
140140

141141

142142
class AWSNodeGroupInputVars(schema.Base):
@@ -155,7 +155,7 @@ class AWSNodeGroupInputVars(schema.Base):
155155
def construct_aws_ami_type(gpu_enabled: bool, launch_template: AWSNodeLaunchTemplate):
156156
"""Construct the AWS AMI type based on the provided parameters."""
157157

158-
if launch_template and launch_template.ami_id:
158+
if launch_template and launch_template._ami_id:
159159
return "CUSTOM"
160160

161161
if gpu_enabled:

0 commit comments

Comments
 (0)