terraformopenstackterraform-provider-openstack

How to get the terraform state file of already created virtual machines in openstack


I would like to know if it is possible to use terraform or some other tool to obtain state files of already created virtual machines in openstack? I need this because I have a lot of virtual machines and they cannot be recreated because services run on them, but I would like to have descriptions of these machines in terrafrom.

I tried to find some solution, but didn't find anything suitable


Solution

  • you can use terraformer to import all resources at once.

    Example:

    terraformer import openstack --resources=compute,networking --regions=RegionOne
    

    List of supported OpenStack services:

    blockstorage:

    compute:

    networking: