Importing production services
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.
-
You can find the product_UID in the Portal. Click the service to view the URL.
The alphanumeric information at the end of the URL is the product_UID.

-
Run the following command:
Example: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.tfstatefile.
Helpful references
- Megaport Terraform Provider GitHub Best Practice for Imports
- Megaport Terraform Provider GitHub Importing Existing Resources
- Megaport Terraform Provider Registry documentation (import IX)
- Megaport Terraform Provider Registry documentation (import Lag Port)
- Megaport Terraform Provider Registry documentation (import MCR)
- Megaport Terraform Provider Registry documentation (import MVE)
- Megaport Terraform Provider Registry documentation (import NAT Gateway)
- Megaport Terraform Provider Registry documentation (import optional VXC information)
- Megaport Terraform Provider Registry documentation (import VXC)