Module terraform¶
License: ASL 2.0
Version: 1.0.9
This module requires compiler version 2019.3 or higher
Upstream project: https://github.com/inmanta/terraform.git
Entities¶
- entity terraform::Provider¶
Parents:
std::Entity
A Terraform provider
- attribute string namespace¶
Organization in the terraform registry, packaging this provider
- attribute string type¶
The provider type (e.g. “aws”, “vsphere”, “local”)
- attribute string version='latest'¶
The version of the provider to use, setting it to null will get the latest one
- attribute string alias=''¶
An alias to differentiate this provider from other providers with the same binary but different config
- attribute dict config¶
The config to apply to this provider
- attribute bool auto_agent=true¶
Whether to start an agent automatically or not. If set to false the relation agent_config should be set manually. :rel agent_config: This needs to be set only if auto_agent=false
- relation std::AgentConfig agent_config [1]¶
The following implementations are defined for this entity:
The following implements statements select implementations for this entity:
std::none
constrainttrue
terraform::agentConfig
constraintauto_agent
- entity terraform::Resource¶
Parents:
std::PurgeableResource
A Terraform resource
- attribute string type¶
The type of resource this is
- attribute string name¶
An arbitrary name to identify this resource
- attribute string? terraform_id=null¶
If this is set, and the resource state is not stored in parameter yet, the handler will first try to import it, using the provided value as terraform id. :rel provider: The terraform provider for this resource
- attribute dict config¶
The configuration for this resource
- attribute bool purge_on_delete=false¶
- relation terraform::Provider provider [1]¶
The following implements statements select implementations for this entity:
std::none
constrainttrue
Plugins¶
- terraform.get_resource_attribute(resource: terraform::Resource, attribute_path: any) any ¶
Get a resource attribute from the saved parameters (facts). :param resource: The resource we which to get an attribute from. :param attribute_path: The path, in the resource state dict, to the desired value.
- terraform.get_resource_attribute_ref(resource: terraform::Resource, attribute_path: any) dict ¶
Get a resource attribute reference. The difference with get_resource_attribute is that the value is not resolved at compile time but during the handler execution. This means that:
The value can not be manipulated in the model.
We save some time during the compile as we don’t need to make api calls.
We avoid multiple recompile due to unknown values.
- If the targeted value changes, but none of the other attributes of this
resource, we will need a full deploy to have our value up to date.
- Parameters
resource – The resource we which to get an attribute from.
attribute_path – The path, in the resource state dict, to the desired value.
Resources¶
- class terraform.terraform_resource.TerraformResource¶
Resource for entity
terraform::Resource
Id attribute
id
Agent name
provider.agent_config.agentname
Handlers
terraform.terraform_resource.TerraformResourceHandler
Handlers¶
- class terraform.terraform_resource.TerraformResourceHandler¶
Handler name
terraform-resource
Handler for entity
terraform::Resource