Skip to content

Commit

Permalink
init/updateFortiOSTerraform: 1.18.0
Browse files Browse the repository at this point in the history
Signed-off-by: -HQCM <[email protected]>
  • Loading branch information
FTNT-HQCM committed Sep 11, 2023
1 parent d70bb7e commit cd5ed54
Show file tree
Hide file tree
Showing 238 changed files with 17,949 additions and 589 deletions.
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
## 1.18.0 (Unreleased)
## 1.19.0 (Unreleased)


## 1.18.0 (Sep 11, 2023)
BUG FIXES:

* Fix crash issue (#291);

IMPROVEMENTS:

* Support FortiOS v6.4.13, v6.4.14, v7.0.12, v7.4.1;

FEATURES:

* **New Resource:** `fortios_casb_useractivity`
* **New Resource:** `fortios_casb_saasapplication`
* **New Resource:** `fortios_casb_profile`
* **New Resource:** `fortios_rule_otvp`
* **New Resource:** `fortios_rule_otdt`
* **New Resource:** `fortios_switchcontrollerptp_profile`
* **New Resource:** `fortios_switchcontrollerptp_interfacepolicy`
* **New Resource:** `fortios_system_speedtestsetting`
* **New Resource:** `fortios_virtualpatch_profile`
* **New Resource:** `fortios_webproxy_fastfallback`
* **New Resource:** `fortios_firewall_policy_sort`
* **New Resource:** `fortios_firewall_policy_move`
* **New Resource:** `fortios_firewall_securitypolicy_sort`
* **New Resource:** `fortiof_firewall_securitypolicy_move`

## 1.17.0 (Jun 22, 2023)
BUG FIXES:

Expand Down
28 changes: 28 additions & 0 deletions fortios/data_source_firewall_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,10 @@ func dataSourceFirewallPolicy() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"virtual_patch_profile": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"icap_profile": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Expand All @@ -660,6 +664,10 @@ func dataSourceFirewallPolicy() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"casb_profile": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"profile_protocol_options": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -2595,6 +2603,10 @@ func dataSourceFlattenFirewallPolicySctpFilterProfile(v interface{}, d *schema.R
return v
}

func dataSourceFlattenFirewallPolicyVirtualPatchProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenFirewallPolicyIcapProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand All @@ -2615,6 +2627,10 @@ func dataSourceFlattenFirewallPolicySshFilterProfile(v interface{}, d *schema.Re
return v
}

func dataSourceFlattenFirewallPolicyCasbProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenFirewallPolicyProfileProtocolOptions(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand Down Expand Up @@ -4027,6 +4043,12 @@ func dataSourceRefreshObjectFirewallPolicy(d *schema.ResourceData, o map[string]
}
}

if err = d.Set("virtual_patch_profile", dataSourceFlattenFirewallPolicyVirtualPatchProfile(o["virtual-patch-profile"], d, "virtual_patch_profile")); err != nil {
if !fortiAPIPatch(o["virtual-patch-profile"]) {
return fmt.Errorf("Error reading virtual_patch_profile: %v", err)
}
}

if err = d.Set("icap_profile", dataSourceFlattenFirewallPolicyIcapProfile(o["icap-profile"], d, "icap_profile")); err != nil {
if !fortiAPIPatch(o["icap-profile"]) {
return fmt.Errorf("Error reading icap_profile: %v", err)
Expand Down Expand Up @@ -4057,6 +4079,12 @@ func dataSourceRefreshObjectFirewallPolicy(d *schema.ResourceData, o map[string]
}
}

if err = d.Set("casb_profile", dataSourceFlattenFirewallPolicyCasbProfile(o["casb-profile"], d, "casb_profile")); err != nil {
if !fortiAPIPatch(o["casb-profile"]) {
return fmt.Errorf("Error reading casb_profile: %v", err)
}
}

if err = d.Set("profile_protocol_options", dataSourceFlattenFirewallPolicyProfileProtocolOptions(o["profile-protocol-options"], d, "profile_protocol_options")); err != nil {
if !fortiAPIPatch(o["profile-protocol-options"]) {
return fmt.Errorf("Error reading profile_protocol_options: %v", err)
Expand Down
42 changes: 42 additions & 0 deletions fortios/data_source_firewall_proxypolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ func dataSourceFirewallProxyPolicy() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"virtual_patch_profile": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"icap_profile": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Expand All @@ -476,6 +480,10 @@ func dataSourceFirewallProxyPolicy() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"casb_profile": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"profile_protocol_options": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -520,6 +528,10 @@ func dataSourceFirewallProxyPolicy() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"detect_https_in_http_request": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -1523,6 +1535,10 @@ func dataSourceFlattenFirewallProxyPolicySctpFilterProfile(v interface{}, d *sch
return v
}

func dataSourceFlattenFirewallProxyPolicyVirtualPatchProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenFirewallProxyPolicyIcapProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand All @@ -1543,6 +1559,10 @@ func dataSourceFlattenFirewallProxyPolicySshFilterProfile(v interface{}, d *sche
return v
}

func dataSourceFlattenFirewallProxyPolicyCasbProfile(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenFirewallProxyPolicyProfileProtocolOptions(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand Down Expand Up @@ -1587,6 +1607,10 @@ func dataSourceFlattenFirewallProxyPolicyDecryptedTrafficMirror(v interface{}, d
return v
}

func dataSourceFlattenFirewallProxyPolicyDetectHttpsInHttpRequest(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceRefreshObjectFirewallProxyPolicy(d *schema.ResourceData, o map[string]interface{}) error {
var err error

Expand Down Expand Up @@ -1968,6 +1992,12 @@ func dataSourceRefreshObjectFirewallProxyPolicy(d *schema.ResourceData, o map[st
}
}

if err = d.Set("virtual_patch_profile", dataSourceFlattenFirewallProxyPolicyVirtualPatchProfile(o["virtual-patch-profile"], d, "virtual_patch_profile")); err != nil {
if !fortiAPIPatch(o["virtual-patch-profile"]) {
return fmt.Errorf("Error reading virtual_patch_profile: %v", err)
}
}

if err = d.Set("icap_profile", dataSourceFlattenFirewallProxyPolicyIcapProfile(o["icap-profile"], d, "icap_profile")); err != nil {
if !fortiAPIPatch(o["icap-profile"]) {
return fmt.Errorf("Error reading icap_profile: %v", err)
Expand Down Expand Up @@ -1998,6 +2028,12 @@ func dataSourceRefreshObjectFirewallProxyPolicy(d *schema.ResourceData, o map[st
}
}

if err = d.Set("casb_profile", dataSourceFlattenFirewallProxyPolicyCasbProfile(o["casb-profile"], d, "casb_profile")); err != nil {
if !fortiAPIPatch(o["casb-profile"]) {
return fmt.Errorf("Error reading casb_profile: %v", err)
}
}

if err = d.Set("profile_protocol_options", dataSourceFlattenFirewallProxyPolicyProfileProtocolOptions(o["profile-protocol-options"], d, "profile_protocol_options")); err != nil {
if !fortiAPIPatch(o["profile-protocol-options"]) {
return fmt.Errorf("Error reading profile_protocol_options: %v", err)
Expand Down Expand Up @@ -2064,6 +2100,12 @@ func dataSourceRefreshObjectFirewallProxyPolicy(d *schema.ResourceData, o map[st
}
}

if err = d.Set("detect_https_in_http_request", dataSourceFlattenFirewallProxyPolicyDetectHttpsInHttpRequest(o["detect-https-in-http-request"], d, "detect_https_in_http_request")); err != nil {
if !fortiAPIPatch(o["detect-https-in-http-request"]) {
return fmt.Errorf("Error reading detect_https_in_http_request: %v", err)
}
}

return nil
}

Expand Down
52 changes: 52 additions & 0 deletions fortios/data_source_router_bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@ func dataSourceRouterBgp() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"filter_list_in_vpnv4": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"filter_list_out": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Expand All @@ -589,6 +593,10 @@ func dataSourceRouterBgp() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"filter_list_out_vpnv4": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"interface": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -1138,6 +1146,10 @@ func dataSourceRouterBgp() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"filter_list_in_vpnv4": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"filter_list_out": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Expand All @@ -1146,6 +1158,10 @@ func dataSourceRouterBgp() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"filter_list_out_vpnv4": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"interface": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -2483,6 +2499,11 @@ func dataSourceFlattenRouterBgpNeighbor(v interface{}, d *schema.ResourceData, p
tmp["filter_list_in6"] = dataSourceFlattenRouterBgpNeighborFilterListIn6(i["filter-list-in6"], d, pre_append)
}

pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_in_vpnv4"
if _, ok := i["filter-list-in-vpnv4"]; ok {
tmp["filter_list_in_vpnv4"] = dataSourceFlattenRouterBgpNeighborFilterListInVpnv4(i["filter-list-in-vpnv4"], d, pre_append)
}

pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_out"
if _, ok := i["filter-list-out"]; ok {
tmp["filter_list_out"] = dataSourceFlattenRouterBgpNeighborFilterListOut(i["filter-list-out"], d, pre_append)
Expand All @@ -2493,6 +2514,11 @@ func dataSourceFlattenRouterBgpNeighbor(v interface{}, d *schema.ResourceData, p
tmp["filter_list_out6"] = dataSourceFlattenRouterBgpNeighborFilterListOut6(i["filter-list-out6"], d, pre_append)
}

pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_out_vpnv4"
if _, ok := i["filter-list-out-vpnv4"]; ok {
tmp["filter_list_out_vpnv4"] = dataSourceFlattenRouterBgpNeighborFilterListOutVpnv4(i["filter-list-out-vpnv4"], d, pre_append)
}

pre_append = pre + "." + strconv.Itoa(con) + "." + "interface"
if _, ok := i["interface"]; ok {
tmp["interface"] = dataSourceFlattenRouterBgpNeighborInterface(i["interface"], d, pre_append)
Expand Down Expand Up @@ -3069,6 +3095,10 @@ func dataSourceFlattenRouterBgpNeighborFilterListIn6(v interface{}, d *schema.Re
return v
}

func dataSourceFlattenRouterBgpNeighborFilterListInVpnv4(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenRouterBgpNeighborFilterListOut(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand All @@ -3077,6 +3107,10 @@ func dataSourceFlattenRouterBgpNeighborFilterListOut6(v interface{}, d *schema.R
return v
}

func dataSourceFlattenRouterBgpNeighborFilterListOutVpnv4(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenRouterBgpNeighborInterface(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand Down Expand Up @@ -3775,6 +3809,11 @@ func dataSourceFlattenRouterBgpNeighborGroup(v interface{}, d *schema.ResourceDa
tmp["filter_list_in6"] = dataSourceFlattenRouterBgpNeighborGroupFilterListIn6(i["filter-list-in6"], d, pre_append)
}

pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_in_vpnv4"
if _, ok := i["filter-list-in-vpnv4"]; ok {
tmp["filter_list_in_vpnv4"] = dataSourceFlattenRouterBgpNeighborGroupFilterListInVpnv4(i["filter-list-in-vpnv4"], d, pre_append)
}

pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_out"
if _, ok := i["filter-list-out"]; ok {
tmp["filter_list_out"] = dataSourceFlattenRouterBgpNeighborGroupFilterListOut(i["filter-list-out"], d, pre_append)
Expand All @@ -3785,6 +3824,11 @@ func dataSourceFlattenRouterBgpNeighborGroup(v interface{}, d *schema.ResourceDa
tmp["filter_list_out6"] = dataSourceFlattenRouterBgpNeighborGroupFilterListOut6(i["filter-list-out6"], d, pre_append)
}

pre_append = pre + "." + strconv.Itoa(con) + "." + "filter_list_out_vpnv4"
if _, ok := i["filter-list-out-vpnv4"]; ok {
tmp["filter_list_out_vpnv4"] = dataSourceFlattenRouterBgpNeighborGroupFilterListOutVpnv4(i["filter-list-out-vpnv4"], d, pre_append)
}

pre_append = pre + "." + strconv.Itoa(con) + "." + "interface"
if _, ok := i["interface"]; ok {
tmp["interface"] = dataSourceFlattenRouterBgpNeighborGroupInterface(i["interface"], d, pre_append)
Expand Down Expand Up @@ -4351,6 +4395,10 @@ func dataSourceFlattenRouterBgpNeighborGroupFilterListIn6(v interface{}, d *sche
return v
}

func dataSourceFlattenRouterBgpNeighborGroupFilterListInVpnv4(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenRouterBgpNeighborGroupFilterListOut(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand All @@ -4359,6 +4407,10 @@ func dataSourceFlattenRouterBgpNeighborGroupFilterListOut6(v interface{}, d *sch
return v
}

func dataSourceFlattenRouterBgpNeighborGroupFilterListOutVpnv4(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenRouterBgpNeighborGroupInterface(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand Down
28 changes: 28 additions & 0 deletions fortios/data_source_router_policy6.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ func dataSourceRouterPolicy6() *schema.Resource {
Type: schema.TypeInt,
Computed: true,
},
"start_source_port": &schema.Schema{
Type: schema.TypeInt,
Computed: true,
},
"end_source_port": &schema.Schema{
Type: schema.TypeInt,
Computed: true,
},
"gateway": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -307,6 +315,14 @@ func dataSourceFlattenRouterPolicy6EndPort(v interface{}, d *schema.ResourceData
return v
}

func dataSourceFlattenRouterPolicy6StartSourcePort(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenRouterPolicy6EndSourcePort(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}

func dataSourceFlattenRouterPolicy6Gateway(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand Down Expand Up @@ -484,6 +500,18 @@ func dataSourceRefreshObjectRouterPolicy6(d *schema.ResourceData, o map[string]i
}
}

if err = d.Set("start_source_port", dataSourceFlattenRouterPolicy6StartSourcePort(o["start-source-port"], d, "start_source_port")); err != nil {
if !fortiAPIPatch(o["start-source-port"]) {
return fmt.Errorf("Error reading start_source_port: %v", err)
}
}

if err = d.Set("end_source_port", dataSourceFlattenRouterPolicy6EndSourcePort(o["end-source-port"], d, "end_source_port")); err != nil {
if !fortiAPIPatch(o["end-source-port"]) {
return fmt.Errorf("Error reading end_source_port: %v", err)
}
}

if err = d.Set("gateway", dataSourceFlattenRouterPolicy6Gateway(o["gateway"], d, "gateway")); err != nil {
if !fortiAPIPatch(o["gateway"]) {
return fmt.Errorf("Error reading gateway: %v", err)
Expand Down
Loading

0 comments on commit cd5ed54

Please sign in to comment.