惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
V
V2EX
PCI Perspectives
PCI Perspectives
Latest news
Latest news
博客园 - 三生石上(FineUI控件)
C
CERT Recently Published Vulnerability Notes
W
WeLiveSecurity
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
WordPress大学
WordPress大学
V
Vulnerabilities – Threatpost
H
Heimdal Security Blog
Attack and Defense Labs
Attack and Defense Labs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News: Ask HN
Hacker News: Ask HN
博客园 - 叶小钗
V
Visual Studio Blog
Jina AI
Jina AI
P
Proofpoint News Feed
罗磊的独立博客
SecWiki News
SecWiki News
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 热门话题
Security Archives - TechRepublic
Security Archives - TechRepublic
The Hacker News
The Hacker News
Hugging Face - Blog
Hugging Face - Blog
N
News and Events Feed by Topic
NISL@THU
NISL@THU
T
Tailwind CSS Blog
T
Tenable Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Recent Announcements
Recent Announcements
H
Hacker News: Front Page
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Tor Project blog
宝玉的分享
宝玉的分享
Help Net Security
Help Net Security
S
Security Affairs
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
G
GRAHAM CLULEY

Megaport Blog

A Guide to NAT Gateway A Guide to Cloud Storage How the Data Center Is Evolving in 2026 What to Expect When Attending Your First Network Operator Group (NOG) Nine Ways to Connect to Cloud Using Private Connectivity Migrate Your On-premises to the Cloud: A Step-by-Step Guide How to Lower Your Egress Fees in 2026 How to Achieve Data Sovereignty in Europe Cisco and Megaport: Redefining the Edge of Modern Networking How to Reduce Latency in Your Multicloud Environment Introducing Megaport High-Speed Cross-Cloud Encryption Are Businesses Leaving the Cloud? Using Meraki and Megaport Virtual Edge for Multicloud Networking Equinix Metal® is Going Away: Here’s What You Can Do Introducing Megaport On-ramp as a Service Megaport’s Full Solution Portfolio Is Coming to India New Bare-metal GPU Instance Now Available with NVIDIA RTX Pro 6000 A Look Back at 2025: Megaport's Biggest Updates Megaport Expands Into India With Strategic Acquisition of Extreme IX Your 2026 Predictions From AWS re:Invent 2025 What’s Next for NaaS? Top Trends for 2026 What is IPsec? When to Move From Public Internet to Private Connectivity Megaport and Latitude.sh: Bringing Compute and Connectivity Together How to Improve Your Microsoft ExpressRoute Resilience with Megaport Connectivity Comparing Ways to Connect to AWS What is API-First Networking? The Hidden Cost of Running Cloud-Hosted SD-WAN for IaaS How to Overcome NaaS Integration Challenges Introducing SCION with Anapaya and Megaport How You Can Use Network as a Service (NaaS) to Future-Proof Your Network Introducing 400G Ports All the As-a-services, Compared Introducing Megaport IPsec Tunnels High Score: Megaport Hits 1,000 Locations A Guide to Colocation Data Centers Maximizing Peering Through Flow Analysis How to Build Resilient Networks for AI Production Workloads Introducing Packet Filtering on Megaport Cloud Router Building Resilient Government IT: Strategies for Secure, Compliant, and Scalable Connectivity Future-Proofing Government IT: Balancing Innovation, Security, and Sovereignty in a Changing World Telstra Programmable Network Is Being Discontinued. Here’s How to Migrate The Future of WAN Design Depends on Network as a Service (NaaS) Cisco Webex Edge Connect Launches on Megaport Voice and Video Exchange How to Prepare for APRA CPS 230 Regulations Comparing the SD-WAN Licensing Needs of Major Vendors A Guide to Improving Network Performance How Latitude.sh, Wasabi, and Megaport Unlock Cost-Effective Multicloud Four Ways to Connect Your Clouds SD-WAN and MPLS: Weighing the Similarities, Differences, and Benefits What is Network as a Service (NaaS)? How to Arrange Bilateral Peering Sessions Comparing Major SD-WAN Vendors Software Defined Networking in the Healthcare Industry Deploying A Global Network in Minutes With Megaport AWS Direct Connect Gateway (DGW) Data Transfer Outbound Rules Bilateral and Multilateral Peering: What’s the Difference? Multi-Region SD-WAN: Why Megaport SDCI is the Right Choice Microsoft Azure is Going Secure by Default. Are You Ready? Building Production-Ready AI Infrastructure: How Megaport and Vultr Are Solving the Enterprise Challenge Introducing Megaport NAT Gateway A Guide to AWS Security Tools How to Deploy Amazon Bedrock Using AWS Direct Connect and Megaport Azure Private Link, Explained Introducing 100G MCRs Your Questions Answered on Simplifying Hybrid and Multicloud Network Connectivity How to Fix Poor AWS Latency A Look Back at 2024: Megaport’s Biggest Updates Your 2025 Predictions From AWS re:Invent 2024 Six Ways to Get a More Resilient Network in 2025 Multicloud Security: Challenges and Solutions The Real Cost of High Network Latency Why Brazil is Your Key to Unlocking Business Growth in Latin America Why You Need Integrated Network Security Six Key Differences Between Major Cloud Providers How to Automate Your Megaport Infrastructure With APIs Why Italy is Europe’s Next Cloud Expansion Hotspot How to Lower Your Cloud Costs Peering: How Local Is Local? Introducing Megaport AI Exchange Two Scenarios for Hybrid Multicloud Deployment With IBM Cloud and Microsoft Azure How to Connect Equinix and Digital Realty Megaport Enables Microsoft Azure ExpressRoute Metro for More Resilient Network Connectivity Executives, Here’s What Your Network Team Wants You to Know Easy Ways to Interconnect Your Network The Role of the Data Center in Your Network 100G VXC Expansion: Now Available From 597 Data Centers Worldwide Top 10 How-To Guides To Improve Your Network Comparing Encryption in Transit Options A Sustainable Business Strategy Starts With Your Network Solutions to Common API Issues With Megaport Transforming Financial Connectivity: Introducing Megaport Financial Services Exchange (FSX) Megaport Enhancing Connectivity in Adelaide Megaport’s Latest Portal Features and Functionalities Automate Your Network Deployments With The New Megaport Terraform Provider A Recap of the Megaport World Tour 2024 Top 5 Cloud and Networking Announcements From Cisco Live 2024 Megaport Enhancing Connectivity in Canberra AWS PrivateLink, Explained How Megaport and Wasabi Are Simplifying Cloud Storage
Automate Your Multicloud with the Megaport Terraform Provider
Megaport · 2021-04-19 · via Megaport Blog

With Megaport’s Terraform Provider, you can now easily automate the provisioning and management of your Megaport resources, lowering deployment costs and reducing provisioning time by using Infrastructure as Code (IaC).

Many organizations on the cloud infrastructure journey quickly discover the need for tools to automate resources they create and manage. These tools make it easy to record the state of systems, maintain audit trails, and rapidly create consistent environments for testing or deployment purposes.

Amongst those tools, Terraform stands out. It’s highly successful in the multi-vendor cloud automation space. Its parent company, Hashicorp, has a solid reputation for delivering quality solutions and is often preferred over vendors’ own automation tools, which are an afterthought for most cloud services.

Megaport is proud to have its own Terraform module. You can use it right now to manage Megaport resources in the same way you manage compute and storage from the big cloud players.

If you’re not using Terraform yet, but are considering automating your cloud infrastructure, we recommend it. The IaC tool is widely adopted, easy to use, and has a great community for professional support. It has support for hundreds of popular service providers. And best of all, it’s free and open source.

Get a quick run-through of Megaport’s Terraform Provider.

What can you do with Megaport’s Terraform Provider?

Megaport has an independent global network with PoPs in nearly 400 physical locations. This includes on-ramps to all the major cloud brands and many other service providers. Connections between these providers and locations can be created in minutes, and with no lock-in, you can modify them to suit your demands. Megaport Cloud Router can be configured to create advanced network topologies, such as hybrid cloud solutions that connect multiple, distinct virtual networks together. Connecting AWS to Azure would be an example of this topology.

The Megaport Terraform Provider supports the resources required to configure these networks. And to make it even easier, Megaport has published example Terraform templates that create everything from simple data center connections right up to a hybrid cloud with AWS, Google, and Microsoft Azure networks all connected together.

How it works

Under the hood of the Megaport Terraform Provider, the cloud automation tool uses the same API that the Megaport Portal uses. The Megaport API documentation is available for clients who wish to customize Terraform or write their own bespoke integration.

Megaport publishes the code for our Terraform Provider on GitHub, and clients can interact with our DevOps team to report bugs or push their own code improvements for inclusion in the IaC tool.

To communicate with the Megaport API, the provider uses a library written in Go. This abstract’s functionality is customized for Megaport based on the standard Terraform behaviors and makes working on changes easier. The megaportgo library is also on GitHub.

The provider sits outside of the Megaport network and is not part of the paid Megaport product, so we strongly recommend referring to the documentation for support. We also have our short video demonstrating the tool in use.

Megaport and Terraform capabilities

Our Terraform Provider gives you the ability to manage your multicloud infrastructure including Megaport Ports, VXCs, and MCRs.

Getting started with Terraform

Whether you’re using Megaport by itself or with other cloud service providers, Terraform is easy to use. The official website has simple instructions for installing Terraform on your operating system of choice, and there are many tutorials and examples online.

There are only a few basic concepts for new users. The first is that you detail the desired infrastructure in a text file. The format of these is Terraform-specific and looks similar to JSON. The online documentation is clear with specific modules for each cloud provider. Once you get started, you’ll see the naming conventions closely align with the terms you would normally expect to use.

This short example shows the Terraform code you need in order to look up a Megaport location and provision a single network port there:

data megaport_location ndc_b1 {
name = NextDC B1
has_mcr = false
}

resource megaport_port tf_test {
port_name = Test Port
port_speed = 10000
location_id = data.megaport_location.ndc_b1.id
}

If you’ve used Megaport before, these fields will look familiar to you. The location represents a Megaport Enabled Location, which can be in one of hundreds of points of presence worldwide with many different data centre providers.

The other fields are “name” (the user can enter anything here that makes sense to them), and “port speed” in Mbps.

Once you have your file, Terraform can do the rest. As well as creating resources that match your specifications, it can check for differences between the file and the deployed resources, and if you approve, it will safely remove these differences.

Using Terraform

Once Terraform is up and running, it works from the command line of your operating system, giving advanced users the ability to include it within other scripts such as Continuous Deployment tools.

Initially, there are just three commands to remember:

terraform init  
terraform apply  
terraform destroy

All the commands need to be run in the same directory as your text file which describes the infrastructure. Terraform init will determine which provider modules are required to deploy your code and ensure they’re present.

Terraform apply is the launch button. This clever command determines the required sequence of deployment and makes those changes. As a safety precaution, it informs the user of any intended changes and asks for confirmation before proceeding.

When you’re done, terraform destroy will clean up the resources you created.

For advanced users, there are further possible commands and options based on feedback from millions of users. Whatever your use case, chances are somebody has already solved it.

If you aren’t using the Megaport Terraform Provider, give it a try. For more information, visit our Terraform Registry page, or to view our support forum, visit our GitHub.


Stay Updated

Keep up to date on Megaport in the news by following us on social media at:

Twitter: @megaportnetwork

LinkedIn: @megaport

Facebook: @megaportnetworks