Skip to content

BaseResource

laktory.models.BaseResource ¤

Parent class for all Laktory models deployable as one or multiple cloud core resources. This BaseResource class is derived from pydantic.BaseModel.

ATTRIBUTE DESCRIPTION
resource_name

Name of the resource in the context of infrastructure as code. If None, default_resource_name will be used instead.

TYPE: str

options

Resources options specifications

TYPE: ResourceOptions

ATTRIBUTE DESCRIPTION
resource_type_id

Resource type id used to build default resource name. Equivalent to

TYPE: str

resource_key

Resource key used to build default resource name. Equivalent to

TYPE: str

default_resource_name

Resource default name constructed as

TYPE: str

self_as_core_resources

Flag set to True if self must be included in core resources

core_resources

List of core resources to be deployed with this laktory model:

Attributes¤

resource_type_id property ¤

resource_type_id

Resource type id used to build default resource name. Equivalent to class name converted to kebab case. e.g.: SecretScope -> secret-scope

resource_key property ¤

resource_key

Resource key used to build default resource name. Equivalent to name properties if available. Otherwise, empty string.

default_resource_name property ¤

default_resource_name

Resource default name constructed as - {self.resource_type_id}-{self.resource_key} - removing ${resources....} tags - removing ${vars....} tags - Replacing special characters with - to avoid conflicts with resource properties

self_as_core_resources property ¤

self_as_core_resources

Flag set to True if self must be included in core resources

core_resources property ¤

core_resources

List of core resources to be deployed with this laktory model: - class instance (self)


laktory.models.resources.baseresource.ResourceOptions ¤

Bases: BaseModel

Resource options for deployment.

ATTRIBUTE DESCRIPTION
is_enabled

If False, resource is not passed to the IaC backend and is not deployed. May be used for deploying resources to specific stack environments only or for disabling resources when debugging.

TYPE: Union[bool, str]

depends_on

Explicit list of resources dependencies. Supported by both pulumi and terraform.

TYPE: list[str]

provider

Explicit declaration of resources provider. Supported by both pulumi and terraform.

TYPE: str

aliases

Specify aliases for this resource, so that renaming or refactoring doesn’t replace it. Pulumi only.

TYPE: list[str]

delete_before_replace

Override the default create-before-delete behavior when replacing a resource. Pulumi only.

TYPE: bool

ignore_changes

Declare that changes to certain properties should be ignored during a diff. Pulumi only.

TYPE: list[str]

import_

Bring an existing cloud resource into Pulumi. Pulumi only.

TYPE: str

parent

Establish a parent/child relationship between resources. Pulumi only.

TYPE: str

replace_on_changes

Declare that changes to certain properties should be treated as forcing a replacement. Pulumi only.

TYPE: list[str]


laktory.models.resources.baseresource.ResourceLookup ¤

Bases: BaseModel