Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set launch_template.ami_id attrs to private #2842

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading