-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.tf
78 lines (75 loc) · 1.63 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
provider "ciscofdm" {
api_url = "192.168.128.188"
username = "admin"
password = "C1sco12345!"
ssl_no_verify = true
}
#resource "ciscofdm_networkobject" "myobject" {
# name = "GS-Terraform"
# subtype = "HOST"
# value = "2.2.2.3"
#}
resource "ciscofdm_networkobject" "GSNetwork" {
name = "GSNetwork"
subtype = "NETWORK"
value = "10.10.10.0/24"
}
resource "ciscofdm_networkobjectgroup" "mygroup" {
name = "NetworkGroupGS"
objects {
netname = "any-ipv6"
type = "networkobject"
}
objects {
netname = "any-ipv4"
type = "networkobject"
}
type = "networkobjectgroup"
}
#resource "ciscofdm_portobject" "GSPORT_4444" {
# name = "GSPORT 4444-5000"
# layer4 = "TCP"
# port = "4444"
#}
#resource "ciscofdm_portobjectgroup" "myportobjectgroup" {
# name = "GSPORTGROUP"
# description = "My Port Group"
# type = "portobjectgroup"
# objects {
# name = "FTP"
# type = "tcpportobject"
# }
# objects {
# name = "GTP_PORTS-2123"
# type = "tcpportobject"
# }
#}
#resource "ciscofdm_accessrule" "myaccessrules01" {
# name = "GSTERRAFORMRULE001"
# ruleaction = "PERMIT"
# intrusionpolicy = {
# name = "Connectivity Over Security"
# type = "intrusionpolicy"
# }
#}
resource "ciscofdm_accessrule" "myaccessrules02" {
name = "GSTERRAFORMRULE002"
ruleaction = "PERMIT"
sourcenetworks {
name = "GSNetwork"
type = "networkobject"
}
destinationnetworks {
name = "any-ipv4"
type = "networkobject"
}
intrusionpolicy = {
name = "Connectivity Over Security"
type = "intrusionpolicy"
}
}
resource "ciscofdm_deploy" "deploy" {
name = "deploy"
subtype = "deploy"
value = "true"
}