cs-image-system-tf-ebs-instance-plugin 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ # SPDX-FileCopyrightText: 2026 Mykel Alvis <mykelalvis@infrastructurebuilder.org>
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from dataclasses import field
6
+ from cs_image_system.base.models.model_config import CSIS_MODEL_CONFIG
7
+ from pydantic.dataclasses import dataclass # stage 23: validation at construction
8
+
9
+ from cs_image_system.base.constants import DEFAULT, VCT
10
+ from cs_image_system.base.helpers.field_helpers import fk_field
11
+ from cs_image_system.base.models.instance_builder import InstanceBuilderModel
12
+ from cs_image_system.hashicorp_utils.hashicorp_models import TFTofuPluginModel
13
+
14
+ TOFU: str = "tofu"
15
+
16
+
17
+ @dataclass(kw_only=True, config=CSIS_MODEL_CONFIG)
18
+ class TofuInstanceBuilderModel(InstanceBuilderModel):
19
+ """OpenTofu IaC builder configuration data object."""
20
+ type = TOFU
21
+ executable: str | None = "tofu"
22
+ required_plugins: list[TFTofuPluginModel] = field(default_factory=list)
23
+ state_configuration: str = fk_field(target=VCT.STATE_BACKEND_MODEL,
24
+ default=DEFAULT, metadata={
25
+ "description": "State backend used for this builder's terraform workspace",
26
+ })
27
+
28
+
29
+ @classmethod
30
+ def csis_name(cls) -> str:
31
+ return TOFU