Action

An action is an executable script under an instance.

If a packet contains executable files, then these will become actions of the instance unless this is disabled through Velocity. Examples are “Create VPC”, “Delete user”, “Import namespaces”, …

Actions always run under a Docker container on the provisioning server of the current environment.

Running an action through the UI can be interactive. By default the ssh-session is displayed.

Actions can be scheduled.

Conditionally disabling action creation

You can disable the creation of actions by setting Velocity variable “skip_action_creation” to true in the packet file that is marked as executable. Make sure that the file is parsed with Velocity.

No action will be available on the instance for this executable with the following code:

#set ($skip_action_creation = true)

https://github.com/infraxys-modules/terraform contains an example on how to use this.

  • Packet “Terraform AWS runner” has a hidden attribute “skip_terraform_action_creation” which is always true.
  • Terraform scripts in packet “Terraform Helper” disable action creation if they are under an instance that has “skip_terraform_action_creation” equal to true:
#if ($instance.getParentInstanceByAttributeValue("skip_terraform_action_creation", "1", false))
	#set ($skip_action_creation = true)
	#stop
#end

This is done because the Terraform packet is managed as part of a bigger configuration.

You can add the Terraform Helper-scripts automatically by adding github.com\infraxys-modules\terraform\master\terraform helper to the inherited files attribute of a packet.