Skip to content

Commit

Permalink
Set launch_template.ami_id attrs to private (#2842)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcmcand authored Nov 13, 2024
2 parents 1c2f8a2 + bf62489 commit 87ed92b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/_nebari/stages/infrastructure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import tempfile
from typing import Annotated, Any, Dict, List, Literal, Optional, Tuple, Type, Union

from pydantic import ConfigDict, Field, field_validator, model_validator
from pydantic import ConfigDict, Field, PrivateAttr, field_validator, model_validator

from _nebari import constants
from _nebari.provider import terraform
Expand Down Expand Up @@ -136,7 +136,7 @@ class AWSAmiTypes(str, enum.Enum):

class AWSNodeLaunchTemplate(schema.Base):
pre_bootstrap_command: Optional[str] = None
ami_id: Optional[str] = None
_ami_id: Optional[str] = PrivateAttr(default=None)


class AWSNodeGroupInputVars(schema.Base):
Expand All @@ -155,7 +155,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:
Expand Down

0 comments on commit 87ed92b

Please sign in to comment.