Skip to content

Commit

Permalink
Fix ForceNew/Required Problems(firewall objects(except for policy) sh…
Browse files Browse the repository at this point in the history
…ould not include ForceNew)
  • Loading branch information
frankshen01 committed Dec 16, 2020
1 parent 0abf5de commit 117c3d7
Show file tree
Hide file tree
Showing 494 changed files with 682 additions and 535 deletions.
2 changes: 1 addition & 1 deletion fortios/resource_antivirus_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceAntivirusProfile() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Required: true,
},
"comment": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_application_custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceApplicationCustom() *schema.Resource {
"tag": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"name": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_application_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceApplicationGroup() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"comment": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_application_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceApplicationList() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Required: true,
},
"comment": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_application_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceApplicationName() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"fosid": &schema.Schema{
Type: schema.TypeInt,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_authentication_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceAuthenticationRule() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"status": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_authentication_scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceAuthenticationScheme() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"method": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_certificate_ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceCertificateCa() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 79),
Required: true,
ForceNew: true,
Required: true,
},
"ca": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_certificate_crl.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceCertificateCrl() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Required: true,
},
"crl": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_certificate_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceCertificateLocal() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Required: true,
},
"password": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_dlp_filepattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func resourceDlpFilepattern() *schema.Resource {
Schema: map[string]*schema.Schema{
"fosid": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
Required: true,
},
"name": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_dlp_fpdocsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceDlpFpDocSource() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"server_type": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_dlp_sensor.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceDlpSensor() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Required: true,
},
"comment": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_dnsfilter_domainfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func resourceDnsfilterDomainFilter() *schema.Resource {
Schema: map[string]*schema.Schema{
"fosid": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
Required: true,
},
"name": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_dnsfilter_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceDnsfilterProfile() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Required: true,
},
"comment": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_endpointcontrol_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ func resourceEndpointControlClient() *schema.Resource {
Schema: map[string]*schema.Schema{
"fosid": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"ftcl_uid": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_endpointcontrol_forticlientems.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceEndpointControlForticlientEms() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"address": &schema.Schema{
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceEndpointControlForticlientRegistrationSync() *schema.Resource {
"peer_name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"peer_ip": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_endpointcontrol_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceEndpointControlProfile() *schema.Resource {
"profile_name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"forticlient_winmac_settings": &schema.Schema{
Type: schema.TypeList,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_endpointcontrol_registeredforticlient.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceEndpointControlRegisteredForticlient() *schema.Resource {
"uid": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 32),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"vdom": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_extendercontroller_extender.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceExtenderControllerExtender() *schema.Resource {
"fosid": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 19),
Required: true,
ForceNew: true,
Required: true,
},
"admin": &schema.Schema{
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion fortios/resource_extendercontroller_extender1.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceExtenderControllerExtender1() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 19),
Required: true,
ForceNew: true,
Required: true,
},
"fosid": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_firewall_DoSpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceFirewallDosPolicy() *schema.Resource {
"policyid": &schema.Schema{
Type: schema.TypeInt,
ValidateFunc: validation.IntBetween(0, 9999),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"status": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_firewall_DoSpolicy6.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceFirewallDosPolicy6() *schema.Resource {
"policyid": &schema.Schema{
Type: schema.TypeInt,
ValidateFunc: validation.IntBetween(0, 9999),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"status": &schema.Schema{
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions fortios/resource_firewall_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceFirewallAddress() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"uuid": &schema.Schema{
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions fortios/resource_firewall_address6.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceFirewallAddress6() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"uuid": &schema.Schema{
Type: schema.TypeString,
Expand Down
1 change: 0 additions & 1 deletion fortios/resource_firewall_address6template.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func resourceFirewallAddress6Template() *schema.Resource {
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
},
"ip6": &schema.Schema{
Type: schema.TypeString,
Expand Down
1 change: 0 additions & 1 deletion fortios/resource_firewall_addrgrp.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func resourceFirewallAddrgrp() *schema.Resource {
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
},
"uuid": &schema.Schema{
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions fortios/resource_firewall_addrgrp6.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceFirewallAddrgrp6() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"uuid": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_firewall_centralsnatmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ func resourceFirewallCentralSnatMap() *schema.Resource {
Schema: map[string]*schema.Schema{
"policyid": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"status": &schema.Schema{
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions fortios/resource_firewall_dnstranslation.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func resourceFirewallDnstranslation() *schema.Resource {
Schema: map[string]*schema.Schema{
"fosid": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"src": &schema.Schema{
Type: schema.TypeString,
Expand Down
1 change: 0 additions & 1 deletion fortios/resource_firewall_identitybasedroute.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func resourceFirewallIdentityBasedRoute() *schema.Resource {
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 35),
Required: true,
ForceNew: true,
},
"comments": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_firewall_interfacepolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ func resourceFirewallInterfacePolicy() *schema.Resource {
Schema: map[string]*schema.Schema{
"policyid": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"status": &schema.Schema{
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion fortios/resource_firewall_interfacepolicy6.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ func resourceFirewallInterfacePolicy6() *schema.Resource {
Schema: map[string]*schema.Schema{
"policyid": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"status": &schema.Schema{
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions fortios/resource_firewall_internetservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func resourceFirewallInternetService() *schema.Resource {
Schema: map[string]*schema.Schema{
"fosid": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"name": &schema.Schema{
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions fortios/resource_firewall_internetservicecustom.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceFirewallInternetServiceCustom() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"reputation": &schema.Schema{
Type: schema.TypeInt,
Expand Down
4 changes: 2 additions & 2 deletions fortios/resource_firewall_internetservicecustomgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func resourceFirewallInternetServiceCustomGroup() *schema.Resource {
"name": &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringLenBetween(0, 63),
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"comment": &schema.Schema{
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions fortios/resource_firewall_internetservicedefinition.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ func resourceFirewallInternetServiceDefinition() *schema.Resource {
Schema: map[string]*schema.Schema{
"fosid": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
Optional: true,
Computed: true,
},
"entry": &schema.Schema{
Type: schema.TypeList,
Expand Down
Loading

0 comments on commit 117c3d7

Please sign in to comment.