2 Replies Latest reply on May 2, 2018 3:48 PM by multihawk

    How to answer mandatory values for each AWS EC2 VM when destroying a deployment via REST API

    JayhawkEric Hot Shot
    vExpert

      We have a Blueprint made up of 5 AWS EC2 VM's.  When destroying a deployment via UI you have to modify the "Delete Volume" option for each VM because it's set to NULL.  I can't find a way to change the default value within the Blueprint but it's not a terrible hassle when using the UI for one or two destroys.

      When trying to destroy a deployment via API, though, the destroy action request template for the deployment doesn't have the "provider-DeleteVolumes" option listed so the destroy fails.  I have to destroy all 5 VM's individually, which adds a lot of load to the system as is it processes 5 times the workflows.

      Deployment destroy action request template:

      {
          "type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
          "resourceId": "7b888b98-e4d8-4e23-a382-71c24692b9ea",
          "actionId": "91d8ab6e-46ff-4573-b730-e7948b7af616",
          "description": null,
          "data": {
              "ForceDestroy": false
          }
      }

      Machine destroy action request template:

      {
          "type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
          "resourceId": "5b802189-4498-469e-939d-530043b8514c",
          "actionId": "5f51c11d-395f-4e08-82b5-d7e09f33f246",
          "description": null,
          "data": {
              "provider-DeleteVolumes": null
          }
      }

      Anyone know how to either change default provider-DeleteVolumes option on the Blueprint OR somehow set this option when destroying the deployment?