learn-terraform

Course outlines for learning terraform.

View the Project on GitHub robertdebock/learn-terraform

Build infrastructure CDN endpoint

expected time requirements
60 minutes a computer

Goal: Learn how to create a CDN on Azure using Terraform.

Explanation

A CDN (Content Delivery Network) is a service that can cache static content of a website, distributed globally. This service improves security and performance.

\0/     +--- Azure CDN ---+      +--- Your website ---+
 | ---> |                 | ---> |                    |
/ \     +-----------------+      +--------------------+

Howto

We’ll use azurerm_cdn_endpoint to play with the CDN service.

Be aware that it may take 90 minutes for the CDN to be propagated. Until that time you will see 404 errors. Once provisioned, changed take up to 90 minutes as well to propagate.

Demo

See this example repository.

Assignment

Applying this code will take a while.

You can try other host_names, depending on the configuration of the remote server, you may be returned a 502 Bad Gateway error.

Questions

  1. Do you see a use-case for this in your environment?