Hello Everyone,
I have a use case for creating an AWS IaaS Blueprint to deploy a vendor provided AMI Image (public from AWS Marketplace). The user would then be presented an option to choose a subnet in a vpc for the image to be deployed. As it is mandatory to specify an AWS AMI Image ID during the IaaS Blueprint creation, the user will not be able to select any subnet outside of the region where the image (that is defined in the blueprint) is available. So for instance if I specify an image that is available in us-west-1 and if the user selects to deploy in a subnet in us-east-2 then the blueprint fails at the "Allocate request" for reservations.
[Infrastructure service provider error: A server error was encountered. Error requesting machine. No reservation is available to allocate within the group AAAAAA. Selected reservation policy was [AWS Res Policy].].
The above error is weird but goes away if I specify the correct AWS AMI ID for the region associated with the reservation policy.
I've tried multiple methods to change the AMI ID programatically but in vain:
- Using EBS (PRE -> BuildingMachine): This does not work as the Allocate for Reservations is executed before the Machine provisioning lifecycle begins.
- Using a XaaS Blueprint to request a catalog Items: I couldn't pass the Amazon Image ID in the JSON payload for the catalog item as it threw the below error... I tried to hack passing the properties "amazon_image" and "__amazon.Image.ID" but resulted in validation errors:
- The value for the field id amazon_image is fixed and cannot be overridden
- [Custom property '__amazon.Image.ID' cannot be from predefined custom properties]
Another solution that I was made aware was to have multiple IaaS Blueprints (or catalog items) for each region with respecitve Amazon Image ID... and have a XaaS blueprint wrapper that can invoke the appropriate catalog item based on the user's request. This mean I need to create multiple catalog items for each region which seems bit messy... Is there a better way to handle this use case scenario?. Any thoughts?
My environment: vRA version 7.4.0 (build 8182598), vRO 7.4.0.8071781
thanks, hari