Skip to content

Commit cd5ed54

Browse files
committed
init/updateFortiOSTerraform: 1.18.0
Signed-off-by: -HQCM <hq-devops-admin@fortinet.com>
1 parent d70bb7e commit cd5ed54

238 files changed

Lines changed: 17949 additions & 589 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
1-
## 1.18.0 (Unreleased)
1+
## 1.19.0 (Unreleased)
22

33

4+
## 1.18.0 (Sep 11, 2023)
5+
BUG FIXES:
6+
7+
* Fix crash issue (#291);
8+
9+
IMPROVEMENTS:
10+
11+
* Support FortiOS v6.4.13, v6.4.14, v7.0.12, v7.4.1;
12+
13+
FEATURES:
14+
15+
* **New Resource:** `fortios_casb_useractivity`
16+
* **New Resource:** `fortios_casb_saasapplication`
17+
* **New Resource:** `fortios_casb_profile`
18+
* **New Resource:** `fortios_rule_otvp`
19+
* **New Resource:** `fortios_rule_otdt`
20+
* **New Resource:** `fortios_switchcontrollerptp_profile`
21+
* **New Resource:** `fortios_switchcontrollerptp_interfacepolicy`
22+
* **New Resource:** `fortios_system_speedtestsetting`
23+
* **New Resource:** `fortios_virtualpatch_profile`
24+
* **New Resource:** `fortios_webproxy_fastfallback`
25+
* **New Resource:** `fortios_firewall_policy_sort`
26+
* **New Resource:** `fortios_firewall_policy_move`
27+
* **New Resource:** `fortios_firewall_securitypolicy_sort`
28+
* **New Resource:** `fortiof_firewall_securitypolicy_move`
29+
430
## 1.17.0 (Jun 22, 2023)
531
BUG FIXES:
632

fortios/data_source_firewall_policy.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,10 @@ func dataSourceFirewallPolicy() *schema.Resource {
640640
Type: schema.TypeString,
641641
Computed: true,
642642
},
643+
"virtual_patch_profile": &schema.Schema{
644+
Type: schema.TypeString,
645+
Computed: true,
646+
},
643647
"icap_profile": &schema.Schema{
644648
Type: schema.TypeString,
645649
Computed: true,
@@ -660,6 +664,10 @@ func dataSourceFirewallPolicy() *schema.Resource {
660664
Type: schema.TypeString,
661665
Computed: true,
662666
},
667+
"casb_profile": &schema.Schema{
668+
Type: schema.TypeString,
669+
Computed: true,
670+
},
663671
"profile_protocol_options": &schema.Schema{
664672
Type: schema.TypeString,
665673
Computed: true,
@@ -2595,6 +2603,10 @@ func dataSourceFlattenFirewallPolicySctpFilterProfile(v interface{}, d *schema.R
25952603
return v
25962604
}
25972605

2606+
func dataSourceFlattenFirewallPolicyVirtualPatchProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
2607+
return v
2608+
}
2609+
25982610
func dataSourceFlattenFirewallPolicyIcapProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
25992611
return v
26002612
}
@@ -2615,6 +2627,10 @@ func dataSourceFlattenFirewallPolicySshFilterProfile(v interface{}, d *schema.Re
26152627
return v
26162628
}
26172629

2630+
func dataSourceFlattenFirewallPolicyCasbProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
2631+
return v
2632+
}
2633+
26182634
func dataSourceFlattenFirewallPolicyProfileProtocolOptions(v interface{}, d *schema.ResourceData, pre string) interface{} {
26192635
return v
26202636
}
@@ -4027,6 +4043,12 @@ func dataSourceRefreshObjectFirewallPolicy(d *schema.ResourceData, o map[string]
40274043
}
40284044
}
40294045

4046+
if err = d.Set("virtual_patch_profile", dataSourceFlattenFirewallPolicyVirtualPatchProfile(o["virtual-patch-profile"], d, "virtual_patch_profile")); err != nil {
4047+
if !fortiAPIPatch(o["virtual-patch-profile"]) {
4048+
return fmt.Errorf("Error reading virtual_patch_profile: %v", err)
4049+
}
4050+
}
4051+
40304052
if err = d.Set("icap_profile", dataSourceFlattenFirewallPolicyIcapProfile(o["icap-profile"], d, "icap_profile")); err != nil {
40314053
if !fortiAPIPatch(o["icap-profile"]) {
40324054
return fmt.Errorf("Error reading icap_profile: %v", err)
@@ -4057,6 +4079,12 @@ func dataSourceRefreshObjectFirewallPolicy(d *schema.ResourceData, o map[string]
40574079
}
40584080
}
40594081

4082+
if err = d.Set("casb_profile", dataSourceFlattenFirewallPolicyCasbProfile(o["casb-profile"], d, "casb_profile")); err != nil {
4083+
if !fortiAPIPatch(o["casb-profile"]) {
4084+
return fmt.Errorf("Error reading casb_profile: %v", err)
4085+
}
4086+
}
4087+
40604088
if err = d.Set("profile_protocol_options", dataSourceFlattenFirewallPolicyProfileProtocolOptions(o["profile-protocol-options"], d, "profile_protocol_options")); err != nil {
40614089
if !fortiAPIPatch(o["profile-protocol-options"]) {
40624090
return fmt.Errorf("Error reading profile_protocol_options: %v", err)

fortios/data_source_firewall_proxypolicy.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,10 @@ func dataSourceFirewallProxyPolicy() *schema.Resource {
456456
Type: schema.TypeString,
457457
Computed: true,
458458
},
459+
"virtual_patch_profile": &schema.Schema{
460+
Type: schema.TypeString,
461+
Computed: true,
462+
},
459463
"icap_profile": &schema.Schema{
460464
Type: schema.TypeString,
461465
Computed: true,
@@ -476,6 +480,10 @@ func dataSourceFirewallProxyPolicy() *schema.Resource {
476480
Type: schema.TypeString,
477481
Computed: true,
478482
},
483+
"casb_profile": &schema.Schema{
484+
Type: schema.TypeString,
485+
Computed: true,
486+
},
479487
"profile_protocol_options": &schema.Schema{
480488
Type: schema.TypeString,
481489
Computed: true,
@@ -520,6 +528,10 @@ func dataSourceFirewallProxyPolicy() *schema.Resource {
520528
Type: schema.TypeString,
521529
Computed: true,
522530
},
531+
"detect_https_in_http_request": &schema.Schema{
532+
Type: schema.TypeString,
533+
Computed: true,
534+
},
523535
},
524536
}
525537
}
@@ -1523,6 +1535,10 @@ func dataSourceFlattenFirewallProxyPolicySctpFilterProfile(v interface{}, d *sch
15231535
return v
15241536
}
15251537

1538+
func dataSourceFlattenFirewallProxyPolicyVirtualPatchProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
1539+
return v
1540+
}
1541+
15261542
func dataSourceFlattenFirewallProxyPolicyIcapProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
15271543
return v
15281544
}
@@ -1543,6 +1559,10 @@ func dataSourceFlattenFirewallProxyPolicySshFilterProfile(v interface{}, d *sche
15431559
return v
15441560
}
15451561

1562+
func dataSourceFlattenFirewallProxyPolicyCasbProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
1563+
return v
1564+
}
1565+
15461566
func dataSourceFlattenFirewallProxyPolicyProfileProtocolOptions(v interface{}, d *schema.ResourceData, pre string) interface{} {
15471567
return v
15481568
}
@@ -1587,6 +1607,10 @@ func dataSourceFlattenFirewallProxyPolicyDecryptedTrafficMirror(v interface{}, d
15871607
return v
15881608
}
15891609

1610+
func dataSourceFlattenFirewallProxyPolicyDetectHttpsInHttpRequest(v interface{}, d *schema.ResourceData, pre string) interface{} {
1611+
return v
1612+
}
1613+
15901614
func dataSourceRefreshObjectFirewallProxyPolicy(d *schema.ResourceData, o map[string]interface{}) error {
15911615
var err error
15921616

@@ -1968,6 +1992,12 @@ func dataSourceRefreshObjectFirewallProxyPolicy(d *schema.ResourceData, o map[st
19681992
}
19691993
}
19701994

1995+
if err = d.Set("virtual_patch_profile", dataSourceFlattenFirewallProxyPolicyVirtualPatchProfile(o["virtual-patch-profile"], d, "virtual_patch_profile")); err != nil {
1996+
if !fortiAPIPatch(o["virtual-patch-profile"]) {
1997+
return fmt.Errorf("Error reading virtual_patch_profile: %v", err)
1998+
}
1999+
}
2000+
19712001
if err = d.Set("icap_profile", dataSourceFlattenFirewallProxyPolicyIcapProfile(o["icap-profile"], d, "icap_profile")); err != nil {
19722002
if !fortiAPIPatch(o["icap-profile"]) {
19732003
return fmt.Errorf("Error reading icap_profile: %v", err)
@@ -1998,6 +2028,12 @@ func dataSourceRefreshObjectFirewallProxyPolicy(d *schema.ResourceData, o map[st
19982028
}
19992029
}
20002030

2031+
if err = d.Set("casb_profile", dataSourceFlattenFirewallProxyPolicyCasbProfile(o["casb-profile"], d, "casb_profile")); err != nil {
2032+
if !fortiAPIPatch(o["casb-profile"]) {
2033+
return fmt.Errorf("Error reading casb_profile: %v", err)
2034+
}
2035+
}
2036+
20012037
if err = d.Set("profile_protocol_options", dataSourceFlattenFirewallProxyPolicyProfileProtocolOptions(o["profile-protocol-options"], d, "profile_protocol_options")); err != nil {
20022038
if !fortiAPIPatch(o["profile-protocol-options"]) {
20032039
return fmt.Errorf("Error reading profile_protocol_options: %v", err)
@@ -2064,6 +2100,12 @@ func dataSourceRefreshObjectFirewallProxyPolicy(d *schema.ResourceData, o map[st
20642100
}
20652101
}
20662102

2103+
if err = d.Set("detect_https_in_http_request", dataSourceFlattenFirewallProxyPolicyDetectHttpsInHttpRequest(o["detect-https-in-http-request"], d, "detect_https_in_http_request")); err != nil {
2104+
if !fortiAPIPatch(o["detect-https-in-http-request"]) {
2105+
return fmt.Errorf("Error reading detect_https_in_http_request: %v", err)
2106+
}
2107+
}
2108+
20672109
return nil
20682110
}
20692111

fortios/data_source_router_bgp.go

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,10 @@ func dataSourceRouterBgp() *schema.Resource {
581581
Type: schema.TypeString,
582582
Computed: true,
583583
},
584+
"filter_list_in_vpnv4": &schema.Schema{
585+
Type: schema.TypeString,
586+
Computed: true,
587+
},
584588
"filter_list_out": &schema.Schema{
585589
Type: schema.TypeString,
586590
Computed: true,
@@ -589,6 +593,10 @@ func dataSourceRouterBgp() *schema.Resource {
589593
Type: schema.TypeString,
590594
Computed: true,
591595
},
596+
"filter_list_out_vpnv4": &schema.Schema{
597+
Type: schema.TypeString,
598+
Computed: true,
599+
},
592600
"interface": &schema.Schema{
593601
Type: schema.TypeString,
594602
Computed: true,
@@ -1138,6 +1146,10 @@ func dataSourceRouterBgp() *schema.Resource {
11381146
Type: schema.TypeString,
11391147
Computed: true,
11401148
},
1149+
"filter_list_in_vpnv4": &schema.Schema{
1150+
Type: schema.TypeString,
1151+
Computed: true,
1152+
},
11411153
"filter_list_out": &schema.Schema{
11421154
Type: schema.TypeString,
11431155
Computed: true,
@@ -1146,6 +1158,10 @@ func dataSourceRouterBgp() *schema.Resource {
11461158
Type: schema.TypeString,
11471159
Computed: true,
11481160
},
1161+
"filter_list_out_vpnv4": &schema.Schema{
1162+
Type: schema.TypeString,
1163+
Computed: true,
1164+
},
11491165
"interface": &schema.Schema{
11501166
Type: schema.TypeString,
11511167
Computed: true,
@@ -2483,6 +2499,11 @@ func dataSourceFlattenRouterBgpNeighbor(v interface{}, d *schema.ResourceData, p
24832499
tmp["filter_list_in6"] = dataSourceFlattenRouterBgpNeighborFilterListIn6(i["filter-list-in6"], d, pre_append)
24842500
}
24852501

2502+
pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_in_vpnv4"
2503+
if _, ok := i["filter-list-in-vpnv4"]; ok {
2504+
tmp["filter_list_in_vpnv4"] = dataSourceFlattenRouterBgpNeighborFilterListInVpnv4(i["filter-list-in-vpnv4"], d, pre_append)
2505+
}
2506+
24862507
pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_out"
24872508
if _, ok := i["filter-list-out"]; ok {
24882509
tmp["filter_list_out"] = dataSourceFlattenRouterBgpNeighborFilterListOut(i["filter-list-out"], d, pre_append)
@@ -2493,6 +2514,11 @@ func dataSourceFlattenRouterBgpNeighbor(v interface{}, d *schema.ResourceData, p
24932514
tmp["filter_list_out6"] = dataSourceFlattenRouterBgpNeighborFilterListOut6(i["filter-list-out6"], d, pre_append)
24942515
}
24952516

2517+
pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_out_vpnv4"
2518+
if _, ok := i["filter-list-out-vpnv4"]; ok {
2519+
tmp["filter_list_out_vpnv4"] = dataSourceFlattenRouterBgpNeighborFilterListOutVpnv4(i["filter-list-out-vpnv4"], d, pre_append)
2520+
}
2521+
24962522
pre_append = pre + "." + strconv.Itoa(con) + "." + "interface"
24972523
if _, ok := i["interface"]; ok {
24982524
tmp["interface"] = dataSourceFlattenRouterBgpNeighborInterface(i["interface"], d, pre_append)
@@ -3069,6 +3095,10 @@ func dataSourceFlattenRouterBgpNeighborFilterListIn6(v interface{}, d *schema.Re
30693095
return v
30703096
}
30713097

3098+
func dataSourceFlattenRouterBgpNeighborFilterListInVpnv4(v interface{}, d *schema.ResourceData, pre string) interface{} {
3099+
return v
3100+
}
3101+
30723102
func dataSourceFlattenRouterBgpNeighborFilterListOut(v interface{}, d *schema.ResourceData, pre string) interface{} {
30733103
return v
30743104
}
@@ -3077,6 +3107,10 @@ func dataSourceFlattenRouterBgpNeighborFilterListOut6(v interface{}, d *schema.R
30773107
return v
30783108
}
30793109

3110+
func dataSourceFlattenRouterBgpNeighborFilterListOutVpnv4(v interface{}, d *schema.ResourceData, pre string) interface{} {
3111+
return v
3112+
}
3113+
30803114
func dataSourceFlattenRouterBgpNeighborInterface(v interface{}, d *schema.ResourceData, pre string) interface{} {
30813115
return v
30823116
}
@@ -3775,6 +3809,11 @@ func dataSourceFlattenRouterBgpNeighborGroup(v interface{}, d *schema.ResourceDa
37753809
tmp["filter_list_in6"] = dataSourceFlattenRouterBgpNeighborGroupFilterListIn6(i["filter-list-in6"], d, pre_append)
37763810
}
37773811

3812+
pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_in_vpnv4"
3813+
if _, ok := i["filter-list-in-vpnv4"]; ok {
3814+
tmp["filter_list_in_vpnv4"] = dataSourceFlattenRouterBgpNeighborGroupFilterListInVpnv4(i["filter-list-in-vpnv4"], d, pre_append)
3815+
}
3816+
37783817
pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_out"
37793818
if _, ok := i["filter-list-out"]; ok {
37803819
tmp["filter_list_out"] = dataSourceFlattenRouterBgpNeighborGroupFilterListOut(i["filter-list-out"], d, pre_append)
@@ -3785,6 +3824,11 @@ func dataSourceFlattenRouterBgpNeighborGroup(v interface{}, d *schema.ResourceDa
37853824
tmp["filter_list_out6"] = dataSourceFlattenRouterBgpNeighborGroupFilterListOut6(i["filter-list-out6"], d, pre_append)
37863825
}
37873826

3827+
pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_out_vpnv4"
3828+
if _, ok := i["filter-list-out-vpnv4"]; ok {
3829+
tmp["filter_list_out_vpnv4"] = dataSourceFlattenRouterBgpNeighborGroupFilterListOutVpnv4(i["filter-list-out-vpnv4"], d, pre_append)
3830+
}
3831+
37883832
pre_append = pre + "." + strconv.Itoa(con) + "." + "interface"
37893833
if _, ok := i["interface"]; ok {
37903834
tmp["interface"] = dataSourceFlattenRouterBgpNeighborGroupInterface(i["interface"], d, pre_append)
@@ -4351,6 +4395,10 @@ func dataSourceFlattenRouterBgpNeighborGroupFilterListIn6(v interface{}, d *sche
43514395
return v
43524396
}
43534397

4398+
func dataSourceFlattenRouterBgpNeighborGroupFilterListInVpnv4(v interface{}, d *schema.ResourceData, pre string) interface{} {
4399+
return v
4400+
}
4401+
43544402
func dataSourceFlattenRouterBgpNeighborGroupFilterListOut(v interface{}, d *schema.ResourceData, pre string) interface{} {
43554403
return v
43564404
}
@@ -4359,6 +4407,10 @@ func dataSourceFlattenRouterBgpNeighborGroupFilterListOut6(v interface{}, d *sch
43594407
return v
43604408
}
43614409

4410+
func dataSourceFlattenRouterBgpNeighborGroupFilterListOutVpnv4(v interface{}, d *schema.ResourceData, pre string) interface{} {
4411+
return v
4412+
}
4413+
43624414
func dataSourceFlattenRouterBgpNeighborGroupInterface(v interface{}, d *schema.ResourceData, pre string) interface{} {
43634415
return v
43644416
}

fortios/data_source_router_policy6.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ func dataSourceRouterPolicy6() *schema.Resource {
9696
Type: schema.TypeInt,
9797
Computed: true,
9898
},
99+
"start_source_port": &schema.Schema{
100+
Type: schema.TypeInt,
101+
Computed: true,
102+
},
103+
"end_source_port": &schema.Schema{
104+
Type: schema.TypeInt,
105+
Computed: true,
106+
},
99107
"gateway": &schema.Schema{
100108
Type: schema.TypeString,
101109
Computed: true,
@@ -307,6 +315,14 @@ func dataSourceFlattenRouterPolicy6EndPort(v interface{}, d *schema.ResourceData
307315
return v
308316
}
309317

318+
func dataSourceFlattenRouterPolicy6StartSourcePort(v interface{}, d *schema.ResourceData, pre string) interface{} {
319+
return v
320+
}
321+
322+
func dataSourceFlattenRouterPolicy6EndSourcePort(v interface{}, d *schema.ResourceData, pre string) interface{} {
323+
return v
324+
}
325+
310326
func dataSourceFlattenRouterPolicy6Gateway(v interface{}, d *schema.ResourceData, pre string) interface{} {
311327
return v
312328
}
@@ -484,6 +500,18 @@ func dataSourceRefreshObjectRouterPolicy6(d *schema.ResourceData, o map[string]i
484500
}
485501
}
486502

503+
if err = d.Set("start_source_port", dataSourceFlattenRouterPolicy6StartSourcePort(o["start-source-port"], d, "start_source_port")); err != nil {
504+
if !fortiAPIPatch(o["start-source-port"]) {
505+
return fmt.Errorf("Error reading start_source_port: %v", err)
506+
}
507+
}
508+
509+
if err = d.Set("end_source_port", dataSourceFlattenRouterPolicy6EndSourcePort(o["end-source-port"], d, "end_source_port")); err != nil {
510+
if !fortiAPIPatch(o["end-source-port"]) {
511+
return fmt.Errorf("Error reading end_source_port: %v", err)
512+
}
513+
}
514+
487515
if err = d.Set("gateway", dataSourceFlattenRouterPolicy6Gateway(o["gateway"], d, "gateway")); err != nil {
488516
if !fortiAPIPatch(o["gateway"]) {
489517
return fmt.Errorf("Error reading gateway: %v", err)

0 commit comments

Comments
 (0)