-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.template
71 lines (49 loc) · 1.86 KB
/
README.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Terraform Azure IP Ranges module
![example workflow](https://github.com/goodworkaround/tfazureipranges/actions/workflows/UpdateModule.yml/badge.svg)
This module provides automatically up to date outputs for all IP ranges found in the [Azure IP Ranges json document](https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519).
All regions are identified using IDs from the table further down on this page.
# Usage
The folders under the Generated folder, all represent either regions (The numeric ones) or services, such as AzureDevOps or LogicApps. Region folder 0 is "Global" services. The reason it is split into folders is performance; a combined module with all outputs takes 1 minute or so to load, on every plan and apply.
```HCL
module "modulename" {
source = "github.com/goodworkaround/tfazureipranges/Generated/<modulefolder>"
}
# You can now use this: module.modulename.<available_output>
```
# Example 1 - Getting NorwayEast and WestEurope IPs for AzureBackup
```HCL
module "azurebackup" {
source = "github.com/goodworkaround/tfazureipranges/Generated/AzureBackup"
}
output "norwayeast" {
value = module.azurebackup.region63 # NorwayEast
}
output "westeurope" {
value = module.azurebackup.region18 # WestEurope
}
```
# Example 2 - Getting several NorthEurope services
```HCL
module "northeurope" {
source = "github.com/goodworkaround/tfazureipranges/Generated/17"
}
output "AppServiceManagement" {
value = module.northeurope.AppServiceManagement
}
output "All" {
value = module.northeurope.All
}
```
# Example 3 - Getting all IPv4 IPs used by Azure Monitor globally
```HCL
module "azureglobal" {
source = "github.com/goodworkaround/tfazureipranges/Generated/0"
}
output "AzureMonitor" {
value = module.azureglobal.AzureMonitor
}
```
# Region ID to region name
REGIONIDTABLE
# List of available outputs, per module
OUTPUTSECTIONS