From cadf3e270b31ccdbdadc6914115f30b93e6cac4c Mon Sep 17 00:00:00 2001 From: marciocloudflare Date: Mon, 14 Oct 2024 15:36:18 +0100 Subject: [PATCH 1/4] added Terraform --- .../magic-wan-on-ramps.mdx | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) 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..d43732866860fb 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 @@ -95,6 +95,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'll 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 or apply your on-ramp with Cloudflare, 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. From e304bd7cda0f4c5c74e9e2b17c10f169600b3b49 Mon Sep 17 00:00:00 2001 From: marciocloudflare Date: Mon, 14 Oct 2024 15:38:49 +0100 Subject: [PATCH 2/4] refined language --- .../partials/magic-cloud-networking/magic-wan-on-ramps.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d43732866860fb..2cb2526352930b 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 @@ -110,7 +110,7 @@ The download will contain two files: If you intend to plan and apply the downloaded configuration using Terraform, you'll 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 or apply your on-ramp with Cloudflare, 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. +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 From 15ebc909658d6d259b2ba595b90ae4d2cdef9206 Mon Sep 17 00:00:00 2001 From: marciocloudflare Date: Tue, 15 Oct 2024 15:06:56 +0100 Subject: [PATCH 3/4] removed extra spaces --- .../partials/magic-cloud-networking/magic-wan-on-ramps.mdx | 3 --- 1 file changed, 3 deletions(-) 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 2cb2526352930b..40c8d4176d7bf8 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**. From 92a00f98a343fca9593cb0743f6de9b7a7675e9a Mon Sep 17 00:00:00 2001 From: marciocloudflare <83226960+marciocloudflare@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:45:37 +0000 Subject: [PATCH 4/4] Update src/content/partials/magic-cloud-networking/magic-wan-on-ramps.mdx Co-authored-by: Maddy <130055405+Maddy-Cloudflare@users.noreply.github.com> --- .../partials/magic-cloud-networking/magic-wan-on-ramps.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 40c8d4176d7bf8..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 @@ -104,7 +104,7 @@ 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'll 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. +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.