Transformer References
How to
Outputs of transformer
Some transformers generate output variables that can be referenced in other transformers or processes. The output variable names follow these rules:
If
prefix
is specified, all output variables use it, and neithername
nortype
will take effect.If
prefix
is not specified butname
is, the output variables usename
.If neither
prefix
norname
is specified, the output variables usetype
.
Usage
If only type
is provided (no name
or prefix
):
transformer:
- type: azure_deploy
The output variables will be:
azure_deploy_address
azure_deploy_port
azure_deploy_username
azure_deploy_password
azure_deploy_private_key_file
If name
is provided but prefix
is not:
transformer:
- type: azure_deploy
name: custom_name
The output variables will be:
custom_name_address
custom_name_port
custom_name_username
custom_name_password
custom_name_private_key_file
If prefix
is provided (regardless of whether name
is set):
transformer:
- type: azure_deploy
name: custom_name
prefix: my_prefix
The output variables will be:
my_prefix_address
my_prefix_port
my_prefix_username
my_prefix_password
my_prefix_private_key_file
Since prefix
is set, the values of name
and type
will not affect the output variable names.
Use Deploy Transformer
Deploy transformer is used to deploy a node in the transformer phase.
Usage
transformer:
- type: azure_deploy
resource_group_name: rg_name
requirement:
azure:
marketplace: image_name
vhd: vhd_url
vm_size: Standard_D16ds_v5
location: westus3
core_count: 5
Outputs
azure_deploy_address
azure_deploy_port
azure_deploy_username
azure_deploy_password
azure_deploy_private_key_file
Reference
resource_group_name
type: string
Name of the resource group in which VM should be deployed. Creates a new RG if not specified.
requirement
type: string
Requirements of the VM such as Image name or VHD. Location to deploy the VM. etc.
core_count
type: int
Automatically selects vm_size based on the count provided.
Use Delete Transformer
Delete transformer is used to delete an environment.
Usage
transformer:
- type: azure_delete
resource_group_name: rg_name
Reference
resource_group_name (Required)
type: string
Name of the resource group that should be deleted.
Use Vhd Transformer
Convert a VM to a VHD using this transformer. This VHD can be used to deploy a VM.
Usage
transformer:
- type: azure_vhd
resource_group_name: rg_name
vm_name: name_of_vm
storage_account_name: str = ""
container_name: container_name
file_name_part: str = ""
custom_blob_name: name_of_blob
restore: false
Outputs
azure_vhd_url
Reference
resource_group_name (Required)
type: string
Name of the resource group containing the VM.
vm_name
type: string
Name of the VM. Required if multiple VMs are present in the resource group.
storage_account_name
type: string | Default: Default LISA storage account
Name of storage account to save the VHD.
container_name
type: string | Default: “lisa-vhd-exported”
Name of the container in the storage account to export the VHD.
file_name_part
type: string | Default: “”
Path to use inside the container. Not applicable if custom_blob_name is specified.
custom_blob_name
type: string | Default: “”
Name of the VHD.
restore
type: bool | Default: false
VM is stopped for exporting VHD. Restore can be set to true to start the VM after exporting.