How do I find DC location information?
The easiest way to find a location is with the location name in the . However, data center location information, such as name or site code, is subject to change in the API. For reliable and stable Terraform configurations, we strongly recommend using the location ID instead of names or codes. For the most up-to-date list of Megaport data center locations, see Megaport Location IDs. Location IDs are also available through the GET /v3/locations Megaport API. For more information, see step 2 in Creating a Megaport Terraform Provider Configuration File.How do I avoid deleting live services in the production environment while deploying a Terraform configuration file?
Lock your live services via the Portal before deploying a Terraform configuration file. For more information, see Locking Megaport Services.How do I add new VXCs to a Port?
If a service such as a Port already exists in the production environment but isn’t in your Terraform configuration file, you will need to import it. For more information, see Importing Existing Production Services. Afterwards, add a new configuration line in the Terraform file to create a new VXC under that Port.How do I change the name of a service?
Update theproduct_name field in the Terraform configuration file.
Example: Change product_name = “Name of Product” to product_name = “Updated Name of Product”, then run the terraform apply command.
Does the Megaport Terraform Provider support managing IX services?
Yes, it does.How do I apply a service key while ordering a VXC?
First, set up a service key in the Portal. For more information, see Setting Up Service Keys. Once the service key is created, you can apply it in your.tf configuration when ordering a VXC.
In the Megaport GitHub repository, there’s an example in resource.tf showing exactly how to do this.
Look for the block that starts like this:
resource "megaport_vxc" "service_key_vxc" {
- Replace
"YOUR-SERVICE-KEY-HERE"with the value from the Portal. - The
b_endblock is where you specify the service key for the remote end. - You can still define other parameters (for example,
rate_limit, VLAN) as required. - The provider docs on GitHub include multiple VXC examples, including MCR and cloud connectivity scenarios.
How do I find the current version of Terraform on my computer?
Run theterraform version command to check the version of Terraform you have installed.
This will output the version information for Terraform.
If the output is similar to the example below, visit Upgrading Guides (HashiCorp) to update your system.
How do I find the current version of the Megaport Terraform Provider?
Megaport actively tests against the two latest major versions of Terraform to ensure compatibility and reliability. You can find the latest version of the Megaport Terraform Provider in the Megaport Terraform Provider Releases page. This page also includes release notes for each version. We highly recommend that you keep your Terraform configuration file updated with the latest provider version to take advantage of improvements, new features, and important fixes.Where do I update the Megaport Terraform Provider version number?
You update the version field in theprovider.tf file.
See version = ">= 1.4.1" in the following example. This is an example of a version coding that instructs Terraform to use a version of the provider that is 1.4.1 or newer.