TerraformResource
laktory.models.TerraformResource
¤
Parent class for all Laktory models deployable with Terraform IaC backend.
PARAMETER | DESCRIPTION |
---|---|
resource_name_
|
Name of the resource in the context of infrastructure as code. If None,
TYPE:
|
options
|
Resources options specifications
TYPE:
|
lookup_existing
|
Lookup resource instead of creating a new one.
TYPE:
|
ATTRIBUTE | DESCRIPTION |
---|---|
core_resources |
List of core resources to be deployed with this laktory model:
|
resource_key |
Resource key used to build default resource name. Equivalent to
TYPE:
|
resource_type_id |
Resource type id used to build default resource name. Equivalent to
TYPE:
|
self_as_core_resources |
Flag set to
|
terraform_excludes |
List of fields to exclude when dumping model to terraform |
terraform_properties |
Resources properties formatted for terraform:
TYPE:
|
terraform_renames |
Map of fields to rename when dumping model to terraform |
core_resources
property
¤
List of core resources to be deployed with this laktory model: - class instance (self)
resource_key
property
¤
Resource key used to build default resource name. Equivalent to name properties if available. Otherwise, empty string.
resource_type_id
property
¤
Resource type id used to build default resource name. Equivalent to class name converted to kebab case. e.g.: SecretScope -> secret-scope
self_as_core_resources
property
¤
Flag set to True
if self must be included in core resources
terraform_excludes
property
¤
List of fields to exclude when dumping model to terraform
terraform_properties
property
¤
Resources properties formatted for terraform:
- Serialization (model dump)
- Removal of excludes defined in
self.terraform_excludes
- Renaming of keys according to
self.terraform_renames
- Injection of variables
RETURNS | DESCRIPTION |
---|---|
dict
|
Terraform-safe model dump |
terraform_renames
property
¤
Map of fields to rename when dumping model to terraform