code: def _terminate_instance(self):
          
          try:
              self.resource.resource_groups.delete(self.running_instance_id)
          except Exception as error:
              raise AzureCloudException(
                  'Unable to terminate resource group: {0}.'.format(error)
              )
docs: Terminate the resource group and instance.