Skip to content

Commit 27dd819

Browse files
authored
cdn overview
1 parent 476bb07 commit 27dd819

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

3_networking/cdn/README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Terraform Template - Azure CDN (Content Delivery Network)
2+
3+
Costa Rica
4+
5+
[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/)
6+
[brown9804](https://github.com/brown9804)
7+
8+
Last updated: 2025-06-11
9+
10+
----------
11+
12+
> This template contains Terraform configurations to create and manage an Azure CDN profile and endpoint.
13+
14+
<p align="center">
15+
<img width="700" alt="image" src=https://github.com/user-attachments/assets/57af5973-c81e-48df-98d9-80957e0f7207">
16+
</p>
17+
18+
19+
## File Descriptions
20+
21+
- **main.tf**: Contains the main configuration for creating the Azure CDN profile and endpoint.
22+
- **variables.tf**: Defines the input variables used in the Terraform configuration.
23+
- **terraform.tfvars**: Provides default values for the variables defined in `variables.tf`.
24+
- **outputs.tf**: Defines the outputs such as CDN profile ID and endpoint host name.
25+
26+
## Variables
27+
28+
| Variable Name | Description | Type | Example Value |
29+
|---------------------- |--------------------------------------------------|--------|-----------------------------|
30+
| `subscription_id` | The Azure subscription ID | string | `"00000000-0000-0000-0000-000000000000"` |
31+
| `resource_group_name` | The name of the resource group | string | `"RG-cdn-test"` |
32+
| `location` | The Azure region to deploy resources | string | `"eastus"` |
33+
| `cdn_profile_name` | The name of the CDN profile | string | `"mycdnprofile"` |
34+
| `cdn_sku` | The SKU for the CDN profile | string | `"Standard_Microsoft"` |
35+
| `cdn_endpoint_name` | The name of the CDN endpoint | string | `"mycdnendpoint"` |
36+
| `origin_host` | The hostname of the origin server | string | `"myorigin.example.com"` |
37+
| `tags` | A map of tags to assign to resources | map | `{ Environment = "CDN", Owner = "IT" }` |
38+
39+
## Usage
40+
41+
1. Clone the repository and navigate to the cdn directory.
42+
2. Update the `terraform.tfvars` file with your values.
43+
3. Initialize and apply the Terraform configuration:
44+
45+
```bash
46+
terraform init
47+
terraform plan
48+
terraform apply
49+
```
50+
51+
## Outputs
52+
53+
| Output Name | Description |
54+
|-------------------------|---------------------------------------------|
55+
| `cdn_profile_id` | The ID of the CDN profile |
56+
| `cdn_endpoint_id` | The ID of the CDN endpoint |
57+
| `cdn_endpoint_host_name`| The host name of the CDN endpoint |
58+
59+
<div align="center">
60+
<h3 style="color: #4CAF50;">Total Visitors</h3>
61+
<img src="https://profile-counter.glitch.me/brown9804/count.svg" alt="Visitor Count" style="border: 2px solid #4CAF50; border-radius: 5px; padding: 5px;"/>
62+
</div>

0 commit comments

Comments
 (0)