Skip to content

Commit

Permalink
init/updateFortiAnalyzerTerraform: 1.4.2
Browse files Browse the repository at this point in the history
Signed-off-by: FTNT-HQCM <[email protected]>
  • Loading branch information
FTNT-HQCM committed Nov 11, 2024
1 parent a197a1f commit 86a639e
Show file tree
Hide file tree
Showing 17 changed files with 311 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## 1.5.0 (Unreleased)

## 1.4.2 (November 12, 2024)

IMPROVEMENTS:

* Support FortiAnalyzer v7.0.13, v7.2.6, v7.2.7, v7.4.4, v7.4.5, v7.6.1;

## 1.4.1 (August 27, 2024)

IMPROVEMENTS:
Expand Down
31 changes: 31 additions & 0 deletions faz/resource_fmupdate_fwmsetting.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ func resourceFmupdateFwmSetting() *schema.Resource {
Optional: true,
Computed: true,
},
"send_image_retry": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
},
"upgrade_timeout": &schema.Schema{
Type: schema.TypeList,
Optional: true,
Expand Down Expand Up @@ -306,6 +310,10 @@ func flattenFmupdateFwmSettingRevisionDiffFfb(v interface{}, d *schema.ResourceD
return v
}

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

func flattenFmupdateFwmSettingUpgradeTimeoutFfb(v interface{}, d *schema.ResourceData, pre string) []map[string]interface{} {
if v == nil {
return nil
Expand Down Expand Up @@ -588,6 +596,16 @@ func refreshObjectFmupdateFwmSetting(d *schema.ResourceData, o map[string]interf
}
}

if err = d.Set("send_image_retry", flattenFmupdateFwmSettingSendImageRetryFfb(o["send-image-retry"], d, "send_image_retry")); err != nil {
if vv, ok := fortiAPIPatch(o["send-image-retry"], "FmupdateFwmSetting-SendImageRetry"); ok {
if err = d.Set("send_image_retry", vv); err != nil {
return fmt.Errorf("Error reading send_image_retry: %v", err)
}
} else {
return fmt.Errorf("Error reading send_image_retry: %v", err)
}
}

if isImportTable() {
if err = d.Set("upgrade_timeout", flattenFmupdateFwmSettingUpgradeTimeoutFfb(o["upgrade-timeout"], d, "upgrade_timeout")); err != nil {
if vv, ok := fortiAPIPatch(o["upgrade-timeout"], "FmupdateFwmSetting-UpgradeTimeout"); ok {
Expand Down Expand Up @@ -677,6 +695,10 @@ func expandFmupdateFwmSettingRevisionDiffFfb(d *schema.ResourceData, v interface
return v, nil
}

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

func expandFmupdateFwmSettingUpgradeTimeoutFfb(d *schema.ResourceData, v interface{}, pre string) (interface{}, error) {
l := v.([]interface{})
if len(l) == 0 || l[0] == nil {
Expand Down Expand Up @@ -932,6 +954,15 @@ func getObjectFmupdateFwmSetting(d *schema.ResourceData) (*map[string]interface{
}
}

if v, ok := d.GetOk("send_image_retry"); ok || d.HasChange("send_image_retry") {
t, err := expandFmupdateFwmSettingSendImageRetryFfb(d, v, "send_image_retry")
if err != nil {
return &obj, err
} else if t != nil {
obj["send-image-retry"] = t
}
}

if v, ok := d.GetOk("upgrade_timeout"); ok || d.HasChange("upgrade_timeout") {
t, err := expandFmupdateFwmSettingUpgradeTimeoutFfb(d, v, "upgrade_timeout")
if err != nil {
Expand Down
32 changes: 32 additions & 0 deletions faz/resource_system_admin_ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ func resourceSystemAdminLdap() *schema.Resource {
Type: schema.TypeString,
Optional: true,
},
"ssl_protocol": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"tertiary_server": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -336,6 +341,10 @@ func flattenSystemAdminLdapServer(v interface{}, d *schema.ResourceData, pre str
return v
}

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

func flattenSystemAdminLdapTertiaryServer(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand Down Expand Up @@ -535,6 +544,16 @@ func refreshObjectSystemAdminLdap(d *schema.ResourceData, o map[string]interface
}
}

if err = d.Set("ssl_protocol", flattenSystemAdminLdapSslProtocol(o["ssl-protocol"], d, "ssl_protocol")); err != nil {
if vv, ok := fortiAPIPatch(o["ssl-protocol"], "SystemAdminLdap-SslProtocol"); ok {
if err = d.Set("ssl_protocol", vv); err != nil {
return fmt.Errorf("Error reading ssl_protocol: %v", err)
}
} else {
return fmt.Errorf("Error reading ssl_protocol: %v", err)
}
}

if err = d.Set("tertiary_server", flattenSystemAdminLdapTertiaryServer(o["tertiary-server"], d, "tertiary_server")); err != nil {
if vv, ok := fortiAPIPatch(o["tertiary-server"], "SystemAdminLdap-TertiaryServer"); ok {
if err = d.Set("tertiary_server", vv); err != nil {
Expand Down Expand Up @@ -673,6 +692,10 @@ func expandSystemAdminLdapServer(d *schema.ResourceData, v interface{}, pre stri
return v, nil
}

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

func expandSystemAdminLdapTertiaryServer(d *schema.ResourceData, v interface{}, pre string) (interface{}, error) {
return v, nil
}
Expand Down Expand Up @@ -850,6 +873,15 @@ func getObjectSystemAdminLdap(d *schema.ResourceData) (*map[string]interface{},
}
}

if v, ok := d.GetOk("ssl_protocol"); ok || d.HasChange("ssl_protocol") {
t, err := expandSystemAdminLdapSslProtocol(d, v, "ssl_protocol")
if err != nil {
return &obj, err
} else if t != nil {
obj["ssl-protocol"] = t
}
}

if v, ok := d.GetOk("tertiary_server"); ok || d.HasChange("tertiary_server") {
t, err := expandSystemAdminLdapTertiaryServer(d, v, "tertiary_server")
if err != nil {
Expand Down
32 changes: 32 additions & 0 deletions faz/resource_system_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ func resourceSystemConnector() *schema.Resource {
Optional: true,
Computed: true,
},
"conn_ssl_protocol": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"faznotify_msg_queue_max": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -149,6 +154,10 @@ func flattenSystemConnectorConnRefreshInterval(v interface{}, d *schema.Resource
return v
}

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

func flattenSystemConnectorFaznotifyMsgQueueMax(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand Down Expand Up @@ -196,6 +205,16 @@ func refreshObjectSystemConnector(d *schema.ResourceData, o map[string]interface
}
}

if err = d.Set("conn_ssl_protocol", flattenSystemConnectorConnSslProtocol(o["conn-ssl-protocol"], d, "conn_ssl_protocol")); err != nil {
if vv, ok := fortiAPIPatch(o["conn-ssl-protocol"], "SystemConnector-ConnSslProtocol"); ok {
if err = d.Set("conn_ssl_protocol", vv); err != nil {
return fmt.Errorf("Error reading conn_ssl_protocol: %v", err)
}
} else {
return fmt.Errorf("Error reading conn_ssl_protocol: %v", err)
}
}

if err = d.Set("faznotify_msg_queue_max", flattenSystemConnectorFaznotifyMsgQueueMax(o["faznotify-msg-queue-max"], d, "faznotify_msg_queue_max")); err != nil {
if vv, ok := fortiAPIPatch(o["faznotify-msg-queue-max"], "SystemConnector-FaznotifyMsgQueueMax"); ok {
if err = d.Set("faznotify_msg_queue_max", vv); err != nil {
Expand Down Expand Up @@ -273,6 +292,10 @@ func expandSystemConnectorConnRefreshInterval(d *schema.ResourceData, v interfac
return v, nil
}

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

func expandSystemConnectorFaznotifyMsgQueueMax(d *schema.ResourceData, v interface{}, pre string) (interface{}, error) {
return v, nil
}
Expand Down Expand Up @@ -318,6 +341,15 @@ func getObjectSystemConnector(d *schema.ResourceData) (*map[string]interface{},
}
}

if v, ok := d.GetOk("conn_ssl_protocol"); ok || d.HasChange("conn_ssl_protocol") {
t, err := expandSystemConnectorConnSslProtocol(d, v, "conn_ssl_protocol")
if err != nil {
return &obj, err
} else if t != nil {
obj["conn-ssl-protocol"] = t
}
}

if v, ok := d.GetOk("faznotify_msg_queue_max"); ok || d.HasChange("faznotify_msg_queue_max") {
t, err := expandSystemConnectorFaznotifyMsgQueueMax(d, v, "faznotify_msg_queue_max")
if err != nil {
Expand Down
32 changes: 32 additions & 0 deletions faz/resource_system_csf.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ func resourceSystemCsf() *schema.Resource {
Optional: true,
Computed: true,
},
"ssl_protocol": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"saml_configuration_sync": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -394,6 +399,10 @@ func flattenSystemCsfLogUnification(v interface{}, d *schema.ResourceData, pre s
return v
}

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

func flattenSystemCsfSamlConfigurationSync(v interface{}, d *schema.ResourceData, pre string) interface{} {
return v
}
Expand Down Expand Up @@ -688,6 +697,16 @@ func refreshObjectSystemCsf(d *schema.ResourceData, o map[string]interface{}) er
}
}

if err = d.Set("ssl_protocol", flattenSystemCsfSslProtocol(o["ssl-protocol"], d, "ssl_protocol")); err != nil {
if vv, ok := fortiAPIPatch(o["ssl-protocol"], "SystemCsf-SslProtocol"); ok {
if err = d.Set("ssl_protocol", vv); err != nil {
return fmt.Errorf("Error reading ssl_protocol: %v", err)
}
} else {
return fmt.Errorf("Error reading ssl_protocol: %v", err)
}
}

if err = d.Set("saml_configuration_sync", flattenSystemCsfSamlConfigurationSync(o["saml-configuration-sync"], d, "saml_configuration_sync")); err != nil {
if vv, ok := fortiAPIPatch(o["saml-configuration-sync"], "SystemCsf-SamlConfigurationSync"); ok {
if err = d.Set("saml_configuration_sync", vv); err != nil {
Expand Down Expand Up @@ -884,6 +903,10 @@ func expandSystemCsfLogUnification(d *schema.ResourceData, v interface{}, pre st
return v, nil
}

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

func expandSystemCsfSamlConfigurationSync(d *schema.ResourceData, v interface{}, pre string) (interface{}, error) {
return v, nil
}
Expand Down Expand Up @@ -1154,6 +1177,15 @@ func getObjectSystemCsf(d *schema.ResourceData) (*map[string]interface{}, error)
}
}

if v, ok := d.GetOk("ssl_protocol"); ok || d.HasChange("ssl_protocol") {
t, err := expandSystemCsfSslProtocol(d, v, "ssl_protocol")
if err != nil {
return &obj, err
} else if t != nil {
obj["ssl-protocol"] = t
}
}

if v, ok := d.GetOk("saml_configuration_sync"); ok || d.HasChange("saml_configuration_sync") {
t, err := expandSystemCsfSamlConfigurationSync(d, v, "saml_configuration_sync")
if err != nil {
Expand Down
Loading

0 comments on commit 86a639e

Please sign in to comment.