This help topic describes steps to import existing production services into a target Terraform configuration file.
You might already have live services in your production environment. To transition to fully automated service management using the Megaport Terraform Provider, the corresponding Terraform configuration file must include resource definitions for all existing services, such as product name, speed, location, and so on.To achieve this, you will need to import these services into the Terraform configuration file.
To import existing production services, follow these steps. We recommend testing the process in the staging environment first.To import production services
Create definitions matching the production service(s) in the target directory where related Terraform configuration files exist.For example, if you want to import an MCR then you need to add the following Terraform configuration file into the target directory.
After the import is complete, you will see a message similar to the following:Confirm that the target service is imported into Terraform as intended by reviewing the terraform.tfstate file.