Comment on page
Documentation
A CLI tool that generates
tf
/json
and tfstate
files based on existing infrastructure (reverse Terraform).Proper credential must be configured, before it can be used. You can set the environment variables for HTTP basic authentication:
export IONOS_USERNAME="username"
export IONOS_PASSWORD="password"
Or you can use token authentication:
export IONOS_TOKEN="token"
In order to build Terraformer with IONOS Cloud Provider, you can run the following command:
go run build/main.go ionoscloud
This will create an executable named
terraformer-ionoscloud
.You can execute the previously created executable and you can ask Terraformer to import various resources (if they are supported) in various ways. The command presented below imports all
LAN
resources:./terraformer-ionoscloud import ionoscloud --resources=lan
The name of the resource must exist in the list of supported IONOS Cloud resources presented above and must match the exact naming.
We allow only resources that provide valid terraform plans to be imported. If you do not see your resource in the tf plan, please enable
TF_LOG=debug
and check logs for a message that will let you know why the resource was not imported.Notes:
- A server must have a
NIC
and avolume
attached to be allowed to be imported by terraformer. - A server must also have a
BootVolume
set.
Last modified 9mo ago