Get the list of AWS Instances and passed as an input to make it "selectlist" for catalog

I am creating a catalog for terraform activity , which needs aws instance id as input , I dont want to copy and paste instance id from aws portal everytime , i want to create a input with select List and pass all the instance id’s to it , so that an enduser can select the instance from the list and submit catalog

Hello Paul,

you can achieve this using the REST API option list.
you can also filter based on zoneId(AWS Cloud ID) , so that the result will have all servers (managed & discovered) in AWS cloud.
in the translation script, you can make the name of the VM in the list box and the value can be externalId.
The below API doc link will help you to list all servers.


As @vsenthilkarasu stated, you can utilized the Option List type “Morpheus API”. Set the Option List then to “Instances”. If you need to filter off of specific cloud types or clouds, you would create these within the “Request Script”

By default, Morpheus will present Name and pass ID so a Translation script shouldn’t be required for your use case. However, you can place this default translation script if desired:

for (var x = 0; x < data.folders.length; x++) {
results.push({name:data.folders[x].name, value:data.folders[x].id});

Thank you for this information , t helped me partially but unable to get what i am looking ,

It gets me a list to select ec2 instance while submitting catalog but

  1. It only lists the ec2 instance provisioned from morpheus
  2. It gives me an error after selecting the ec2 instance

I either want to get instance name or id to be passed to terraform script from the select list

The logs under Administration > health > Morpheus Logs wou8ld give more details on what the error is. Possibly a bad translation.

You’ll have to use servers not instances if you want discovered VMs to show as well.