diff --git a/src/content/partials/magic-cloud-networking/magic-wan-on-ramps.mdx b/src/content/partials/magic-cloud-networking/magic-wan-on-ramps.mdx index 44fc9f6a5e4554..782657161e99a2 100644 --- a/src/content/partials/magic-cloud-networking/magic-wan-on-ramps.mdx +++ b/src/content/partials/magic-cloud-networking/magic-wan-on-ramps.mdx @@ -37,14 +37,11 @@ Refer to [Reference](/magic-cloud-networking/reference/) to learn more about how 4. Give your new on-ramp a descriptive name. 5. Select the network you want to connect to, and select **Continue**. 6. **Configure on-ramp** shows where Cloudflare will install the new routes. Installing these routes is required to correctly configure both Magic WAN and your cloud provider, and ensure successful communication between them: - - **Add routes for your Magic WAN address space to your cloud network**: Select this option to install routes for reaching Magic WAN in your cloud network's route tables (refer to [Magic WAN Address Space](#magic-wan-address-space) to learn what routes are installed and how to customize them). If you prefer to do this manually, unselect this option. :::caution Cloudflare recommends that you leave this option selected. If you unselect **Add routes for your Magic WAN address space to your cloud network**, you will need to manually create all the required configurations to allow Magic WAN to connect to your cloud, like routing tables, transit gateways, and VPNs. Refer to the [Magic WAN How to](/magic-wan/configuration/manually/how-to/) section, or consult the documentation for your cloud provider for more information. ::: - - **Add routes for your cloud network to Magic WAN**: Select this option to create routes for reaching your cloud network in Magic WAN. - 7. Select **Continue**. Applying your settings might take a few seconds to complete. 8. Review the changes in your cloud environment, and select **Approve changes**. @@ -95,6 +92,40 @@ To override the defaults with custom prefixes: To install a default route to send all traffic to Magic WAN, enter `0.0.0.0/0` (on Azure, enter `0.0.0.0/1` and `128.0.0.0/1`). +## Set up with Terraform + +You can download a Terraform configuration for a cloud on-ramp. You might want to do this to: + +- Review the proposed configuration for an on-ramp before deploying it with Cloudflare. +- Deploy the on-ramp using your own infrastructure-as-code pipeline instead of deploying it with Cloudflare. + +The download will contain two files: + +- `main.tf`: Terraform configuration for the new resources needed to create the on-ramp. +- `instructions.txt`: Instructions for modifying resources that already exist in your cloud environment. + +If you intend to plan and apply the downloaded configuration using Terraform, you will need to use the [Cloudflare Terraform provider](/terraform/) (in addition to the Terraform provider for the on-ramp's cloud service provider). Use your Cloudflare [Global API Key](/fundamentals/api/get-started/keys/), not an API Token. + +:::caution +Do not deploy the on-ramp using both Cloudflare and Terraform. If you plan to deploy your on-ramp with Cloudflare (meaning you are both planning to create an on-ramp and applying an on-ramp), Cloudflare creates resources that will result in conflicts when you run Terraform (and vice versa). The Cloudflare dashboard will warn you if it detects you might encounter a conflict. +::: + +### Download Terraform configuration for a new on-ramp + +1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account. +2. Select **Magic WAN** > **Cloud on-ramps**. +3. Select **Add new on-ramp** and begin the **Create a Magic WAN cloud on-ramp** workflow as normal. +4. After the **Configure route propagation** step, select **View download options** instead of selecting **Continue**. +5. Select a download option: + 1. Choose **Download and continue** to download the Terraform configuration, review the configuration, and then continue deploying the on-ramp with Cloudflare. + 2. Choose **Download and exit** to download the Terraform configuration that you will apply yourself. + +### Download Terraform configuration for an existing on-ramp + +1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account. +2. Select **Magic WAN** > **Cloud on-ramps**. +3. Select the three dots for the on-ramp you want to download > **Download Terraform**. + ## Cost estimates You can view estimated costs associated with your cloud resources in the Cloudflare dashboard.