I want to present IAM profile for end user to select while deploying the service catalog, Is there any way to create an Option list for the same and attach as a custom option. As checked, I could not find any such Option list or Morpheus variables to use.
There is no native way. However, you could use the Python module boto3 in a script to get the IAM profiles you desire and have it generate a manual option list via the Morpheus API. The Python task could be run as a nightly job to keep your list up to date within the last 24 hours. Others may have a more elegant solution.
I would generally recommend professional services for something like this.
Using the below in both request and translation script ( in fact tried all combinations just translation, just request but still doesn’t work)
for (var x = 0; x < data.length; x++) {
results.push({name:data.name, value:data.value});
}
My larger goal is to have IAM instance profiles be populated based on the Cloud selected in the catalog. if I can make the above working… next step would be to making REST query dynamic in nature.
Thank you @vsenthilkarasu for this and further support in making the query generic.
Below I am capturing how this was achieved.
I have also made the Option List Generic as below… This allows the filters of the IAM profile based on the Cloud selected which is also a dependent field of my iam-profile input (input.cloudlist)