Input output mapping for templates and Helm charts
Mapping procedure in the Managed services user interface and their input output formats.
- Template / Helm input parameters
- Template / Helm output parameters
- For service instance level parameter details and service instance level parameters in Error flow, see Service instance level parameters.
Template / Helm chart input parameters
Representing input parameters and attributes of an activity within another activity.
Note: The templates
word in the syntax is used for both template and helm activities.
-
If your source parameter is defined in the input parameters section of an activity, then use the following format to call its value within another activity:
${activity.id.paramname}
Examples:
-
For example,
Apache Tomcat on a single virtual machine
template activity hasTomcatNode01-mgmt-network-public
parameter defined in the INPUT PARAMETERS section. Use the following format to call its value within another activity:${templates.tomcat019453ac.TomcatNode01-mgmt-network-public}
or
${templates.tomcat019453ac.input.TomcatNode01-mgmt-network-public}
Where
tomcat019453ac
is the activity Id. -
For example, mapping the output of
IPAM
template as an input toOracle Database 12c Enterprise Edition on a single virtual machine template
:OracleDBNode01_dns_suffixes": "${templates.ipam1467a9b92b6c.output.ipam_result_domain_list}, OracleDBNode01_domain": "${templates.ipam1467a9b92b6c.output.ipam_result_domain_str}, OracleDBNode01-name": "${templates.ipam1467a9b92b6c.output.ipam_result_host}, OracleDBNode01_ipv4_address": "${templates.ipam1467a9b92b6c.output.ipam_result_ip_address},
Where
OracleDBNode01
is the ID ofOracle Database 12c Enterprise Edition on a single virtual machine
template.-
ipam1467a9b92b6c
is the ID ofIPAM
template.The sample snippet of Service Composition Language wherein the output of one template activity is mapped as input into another template activity:
"templates": [ { "IPAM": { "title": "IPAM_b76b9c", "template_name": "IPAM", "version": "v1.0.0", "id": "ipam1467a9b92b6c", "template_type": "Terraform", "template_content_type": "Other", "template_provider": "Other", "instance_name": "", "cloud_connection_name": "Other", "template_data_objects": {}, "template_params": { "ipam_ip_address": "9.9.9.9", "ipam_result_domain": "domain", "ipam_result_host": "hostname", "ipam_result_ip_address": "ipaddress" }, "outputs": [ "ipam_result_domain_list", "ipam_result_domain_str", "ipam_result_host", "ipam_result_ip_address" ] } }, { "Oracle Database 12c Enterprise Edition on a single virtual machine": { "title": "Oracle Database 12c Enterprise Edition on a single virtual machine_6ec8ab", "template_name": "Oracle Database 12c Enterprise Edition on a single virtual machine - VMware vSphere", "version": "2.1", "id": "oracledaff0e8430", "template_type": "Terraform", "template_content_type": "VMware vSphere", "template_provider": "VMware vSphere", "instance_name": "", "cloud_connection_name": "VMware", "template_data_objects": { "bastionhost": "DefaultNoBastionHostRequired", "httpproxy": "DefaultNoProxyRequired", "advanced_content_runtime_chef": "VMware" }, "template_params": { "OracleDBNode01_dns_servers": [ "9.5.46.5", "9.5.48.5" ], "OracleDBNode01_dns_suffixes": "${templates.ipam1467a9b92b6c.output.ipam_result_domain_list}", "OracleDBNode01_domain": "${templates.ipam1467a9b92b6c.output.ipam_result_domain_str}", "OracleDBNode01-image": "terraform/content/RHEL7-content", "OracleDBNode01-os_admin_user": "root", "OracleDBNode01-os_password": "aaaaaa", "OracleDBNode01_oracledb_version": "v12c", "OracleDBNode01_oracledb_port": "1521", "OracleDBNode01_oracledb_release_patchset": "0.0.0.0.0", "OracleDBNode01_oracledb_SID": "ORCL", "OracleDBNode01_root_disk_size": "250", "OracleDBNode01_oracledb_security_sys_pw": "aaaaaa", "OracleDBNode01_oracledb_security_system_pw": "aaaaaa", "OracleDBNode01-name": "${templates.ipam1467a9b92b6c.output.ipam_result_host}", "OracleDBNode01_root_disk_datastore": "datastore1", "OracleDBNode01_ipv4_gateway": "9.9.9.9", "OracleDBNode01_ipv4_address": "${templates.ipam1467a9b92b6c.output.ipam_result_ip_address}", "OracleDBNode01_memory": 8192, "OracleDBNode01_ipv4_prefix_length": "24", "OracleDBNode01_number_of_vcpu": 2, "OracleDBNode01_network_interface_label": "VM Network", "OracleDBNode01_cluster": "icm-vmware-nsx-2", "OracleDBNode01_datacenter": "NSX Manage To", "OracleDBNode01_folder": "terraform/test", "OracleDBNode01_adapter_type": "vmxnet3", "OracleDBNode01_resource_pool": "cam", "user_public_ssh_key": "ssh-rsa AAAABCCCCCCaaaaaaaLDCU3jpchru5Q== abc@in.ibm.com" }, "outputs": [ "OracleDBNode01_ip", "OracleDBNode01_name", "OracleDBNode01_roles", "stack_id" ] } }
- The following input parameters are common for all template/Helm activities:
Format:
${templates.<id>.<attribute name>}
${templates.<id>.instance_name} \\ Name of the instance ${templates.<id>.template_name} \\ Name of the template activity ${templates.<id>.template_version} \\ Version of a template activity ${templates.<id>.title} \\ Title of a template activity ${templates.<id>.stack_id} \\ Stack id of an activity
-
Template / Helm output parameters
Representing output parameters and attributes of a template / helm activity within another activity.
Note: The templates
word in the syntax is used for both template and helm activities.
-
Use the following format for a specific template/helm activity:
-
If you want to map your parameter to the output parameters of another template/helm activity, then prefix the word "output" when you reference it in the value field.
${activity.id.output.paramname}
The
param_name
is the name of the parameter that is returned by a particular template activity or helm activity. It depends on the template definition for terraform templates, and for helm chart, it depends on the parameters defined in IBM Cloud Pak® for Multicloud Management.For example,
Apache Tomcat on a single virtual machine
template activity hasTomcatNode01_ip
defined in the OUTPUT PARAMETERS section. Use the following format to call its value within another activity:${templates.tomcat019453ac.output.TomcatNode01_ip}
Where,
tomcat019453ac
is the template activity Id andTomcatNode01_ip
is the parameter.
-
-
The following output parameters are common for all template/helm activities:
Format:
${templates.<id>.<attribute name>}
${templates.<id>.action} : **`CREATE`** / **`DELETE`** ${templates.<id>.status} : **`SUCCESS`** / **`IN_PROGRESS`** / **`FAILED`** ${templates.<id>.status_message} : additional message for the status ${templates.<id>.stack_message} : template execution stack logs (from IAAS) ${templates.<id>.stack_error_message} : template error message (from IAAS) ${templates.<id>.created_at} : template created at. (from IAAS)