-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.tf
64 lines (60 loc) · 2.23 KB
/
main.tf
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
##########################################################
### Content of the file:
##########################################################
#
###
# Principles
####
# FMC uses references based on ID, which means that any object used in the configuration needs to be created first/or exists on FMC
# It implies the condition that resources need to be created/modified in the correct order
# Module uses a new terraform provider for FMC
# Module is built for multidomain support
# Module is built for easy bulk operations support
#
###
# Local variables
###
# local.fmc => map of FMC configuration loaded from YAML file
# local.domains => map of domain configuration
# local.data_existing => map of existing objects configuration loaded from YAML file (should reflect builtin/read-only objects like SSH, HTTP etc.)
#
###
# Dictionary
###
#
# Interfaces:
# resource naming convention: physical_interface, sub_interface, etherchannel_interface
# name - represents GigabitEthernet0/1, Port-Channel10, TenGigabitEthernet0/1.10
# logical_name - represents inside, outsida, dmz etc.
# ether_channel_id - is taken automaticaly from interface name - Port-Channel10 and eq 10
# sub_interface_id - is taken automaticaly from interface name - TenGigabitEthernet0/1.10 and eq 10
# interface_name - (in sub_interface) represents physical interface and is taken automaticaly from interface name - TenGigabitEthernet0/1.10 and eq TenGigabitEthernet0/1
#
# Netmask:
# netmask - represents: subnet mask, network mask, network subnet, network prefix: 255.255.255.0 or 24
#
# Network:
# prefix - represents network with prefix: 10.0.0.0/24 or IP address with prefix 10.0.0.1/24
#
#
##########################################################
### Example of created local variables
##########################################################
# + data_hosts = {
# + Global = {
# + items = {
# + Host_1 = {}
# }
# }
# }
##########################################################
locals {
fmc = try(local.model.fmc, {})
domains = try(local.fmc.domains, {})
data_existing = try(local.model.existing, {})
}
#provider "fmc" {
# username = "FMC_USERNAME"
# password = "FMC_PASSWORD"
# url = "FMC_URL"
#}