Description of output parameters
Describe the output parameters so that they can be sent to the user by email after the manifest is executed and the service is deployed.
If an output parameter contains sensitive data, set the sensitive attribute. In this case, the output parameter data will be passed to the user, but will not be saved to Terraform logs.
The following can be passed to the user in the output parameters:
-
The IP address of the created service instance VM.
Example of an output parameter for the VM IP address# Output the VM IP addressoutput "address" {description = "The host IP-address"value = vkcs_compute_instance.compute.access_ip_v4} -
Passwords for the initial setup of the service instance, generated by a script.
Example of an output parameter for script results# Script executionresource "ivkcs_agent_exec" "start" {hosts = [local.hosts_name]name = "start"uuid = var.instance_uuidstep {index = 1type = "bash"content = pwgen 25 1options {timeout = "10m"attempts = 1}}depends_on = [vkcs_compute_instance.compute,vkcs_compute_volume_attach.attached,]}# Requesting script resultsdata "ivkcs_agent_script_result" "password" {uuid = var.instance_uuidhost = local.hosts_names[0]group = ivkcs_agent_exec.start.nameindex = 1depends_on = [ivkcs_agent_exec.start]}# Output of script resultsoutput "password" {description = "password"value = data.ivkcs_agent_script_result.password.resultsensitive = true} -
Passwords for the initial setup of the service instance, generated using the
random_passwordresource.Example of an output parameter for a password generated using the `random_password` resourceoutput "default_password" {value = random_password.user.resultsensitive = true} -
A private SSH key for accessing the service instance VM.
Example of an output parameter for a private SSH keyoutput "private_key" {value = ivkcs_ssh_keypair.key.private_keysensitive = true}
Was this article helpful?