@@ -67,7 +67,7 @@ func resourceManagementVpnCommunityStar() *schema.Resource {
67
67
Default : "aes-256" ,
68
68
},
69
69
"ike_p1_rekey_time" : {
70
- Type : schema .TypeInt ,
70
+ Type : schema .TypeString ,
71
71
Optional : true ,
72
72
Description : "Indicates the time interval for IKE phase 1 renegotiation." ,
73
73
Default : 1440 ,
@@ -106,7 +106,7 @@ func resourceManagementVpnCommunityStar() *schema.Resource {
106
106
Default : "group-2" ,
107
107
},
108
108
"ike_p2_rekey_time" : {
109
- Type : schema .TypeInt ,
109
+ Type : schema .TypeString ,
110
110
Optional : true ,
111
111
Description : "Indicates the time interval for IKE phase 2 renegotiation." ,
112
112
Default : 1440 ,
@@ -180,7 +180,7 @@ func resourceManagementVpnCommunityStar() *schema.Resource {
180
180
Schema : map [string ]* schema.Schema {
181
181
"internal_gateway" : {
182
182
Type : schema .TypeString ,
183
- Required : true ,
183
+ Required : true ,
184
184
Description : "Internally managed Check Point gateway identified by name or UID, or 'Any' for all internal-gateways participants in this community." ,
185
185
},
186
186
"external_gateway" : {
@@ -223,7 +223,7 @@ func resourceManagementVpnCommunityStar() *schema.Resource {
223
223
Default : "aes-256" ,
224
224
},
225
225
"ike_p1_rekey_time" : {
226
- Type : schema .TypeInt ,
226
+ Type : schema .TypeString ,
227
227
Optional : true ,
228
228
Description : "Indicates the time interval for IKE phase 1 renegotiation." ,
229
229
Default : 1440 ,
@@ -262,7 +262,7 @@ func resourceManagementVpnCommunityStar() *schema.Resource {
262
262
Default : "group-2" ,
263
263
},
264
264
"ike_p2_rekey_time" : {
265
- Type : schema .TypeInt ,
265
+ Type : schema .TypeString ,
266
266
Optional : true ,
267
267
Description : "Indicates the time interval for IKE phase 2 renegotiation." ,
268
268
Default : 1440 ,
@@ -349,7 +349,7 @@ func createManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) err
349
349
res ["encryption-algorithm" ] = v .(string )
350
350
}
351
351
if v , ok := d .GetOk ("ike_phase_1.ike_p1_rekey_time" ); ok {
352
- res ["ike-p1-rekey-time" ] = v .(int )
352
+ res ["ike-p1-rekey-time" ] = v .(string )
353
353
}
354
354
vpnCommunityStar ["ike-phase-1" ] = res
355
355
}
@@ -371,7 +371,7 @@ func createManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) err
371
371
res ["ike-p2-pfs-dh-grp" ] = v .(bool )
372
372
}
373
373
if v , ok := d .GetOk ("ike_phase_2.ike_p2_rekey_time" ); ok {
374
- res ["ike-p2-rekey-time" ] = v .(int )
374
+ res ["ike-p2-rekey-time" ] = v .(string )
375
375
}
376
376
vpnCommunityStar ["ike-phase-2" ] = res
377
377
}
@@ -467,7 +467,7 @@ func createManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) err
467
467
ikePhase1Payload ["diffie-hellman-group" ] = v .(string )
468
468
}
469
469
if v , ok := d .GetOk ("granular_encryptions." + strconv .Itoa (i ) + ".ike_phase_1.ike_p1_rekey_time" ); ok {
470
- ikePhase1Payload ["ike-p1-rekey-time" ] = v .(int )
470
+ ikePhase1Payload ["ike-p1-rekey-time" ] = v .(string )
471
471
}
472
472
payload ["ike-phase-1" ] = ikePhase1Payload
473
473
}
@@ -486,7 +486,7 @@ func createManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) err
486
486
ikePhase2Payload ["ike-p2-pfs-dh-grp" ] = v .(bool )
487
487
}
488
488
if v , ok := d .GetOk ("granular_encryptions." + strconv .Itoa (i ) + ".ike_phase_2.ike_p2_rekey_time" ); ok {
489
- ikePhase2Payload ["ike-p2-rekey-time" ] = v .(int )
489
+ ikePhase2Payload ["ike-p2-rekey-time" ] = v .(string )
490
490
}
491
491
payload ["ike-phase-2" ] = ikePhase2Payload
492
492
}
@@ -603,7 +603,7 @@ func readManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) error
603
603
ikePhase1MapToReturn ["encryption_algorithm" ] = v
604
604
}
605
605
if v := ikePhase1Map ["ike-p1-rekey-time" ]; v != nil {
606
- ikePhase1MapToReturn ["ike_p1_rekey_time" ] = v
606
+ ikePhase1MapToReturn ["ike_p1_rekey_time" ] = strconv . Itoa ( int ( v .( float64 )))
607
607
}
608
608
_ , ikePhase1InConf := d .GetOk ("ike_phase_1" )
609
609
defaultIkePhase1 := map [string ]interface {}{"encryption_algorithm" : "aes-256" , "diffie_hellman_group" : "group-2" , "data_integrity" : "sha1" }
@@ -635,7 +635,7 @@ func readManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) error
635
635
ikePhase2MapToReturn ["ike_p2_pfs_dh_grp" ] = v
636
636
}
637
637
if v := ikePhase2Map ["ike-p2-rekey-time" ]; v != nil {
638
- ikePhase2MapToReturn ["ike_p2_rekey_time" ] = v
638
+ ikePhase2MapToReturn ["ike_p2_rekey_time" ] = strconv . Itoa ( int ( v .( float64 )))
639
639
}
640
640
_ , ikePhase2InConf := d .GetOk ("ike_phase_2" )
641
641
defaultIkePhase2 := map [string ]interface {}{"encryption_algorithm" : "aes-128" , "data_integrity" : "sha1" }
@@ -673,7 +673,7 @@ func readManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) error
673
673
}
674
674
}
675
675
_ = d .Set ("override_vpn_domains" , overrideVpnDomainsListToReturn )
676
- }else {
676
+ } else {
677
677
_ = d .Set ("override_vpn_domains" , nil )
678
678
}
679
679
@@ -726,7 +726,7 @@ func readManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) error
726
726
}
727
727
}
728
728
_ = d .Set ("shared_secrets" , sharedSecretsListToReturn )
729
- }else {
729
+ } else {
730
730
_ = d .Set ("shared_secrets" , nil )
731
731
}
732
732
@@ -749,7 +749,7 @@ func readManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) error
749
749
if obj ["name" ] != nil {
750
750
internalGatewayName = obj ["name" ].(string )
751
751
}
752
- }else if val , ok := v .(string ); ok {
752
+ } else if val , ok := v .(string ); ok {
753
753
internalGatewayName = val
754
754
}
755
755
granularEncryptionState ["internal_gateway" ] = internalGatewayName
@@ -762,7 +762,7 @@ func readManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) error
762
762
if obj ["name" ] != nil {
763
763
externalGatewayName = obj ["name" ].(string )
764
764
}
765
- }else if val , ok := v .(string ); ok {
765
+ } else if val , ok := v .(string ); ok {
766
766
externalGatewayName = val
767
767
}
768
768
granularEncryptionState ["external_gateway" ] = externalGatewayName
@@ -789,7 +789,7 @@ func readManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) error
789
789
ikePhase1State ["diffie_hellman_group" ] = v
790
790
}
791
791
if v := ikePhase1Show ["ike-p1-rekey-time" ]; v != nil {
792
- ikePhase1State ["ike_p1_rekey_time" ] = v
792
+ ikePhase1State ["ike_p1_rekey_time" ] = strconv . Itoa ( int ( v .( float64 )))
793
793
}
794
794
granularEncryptionState ["ike_phase_1" ] = ikePhase1State
795
795
}
@@ -810,14 +810,14 @@ func readManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) error
810
810
ikePhase2State ["ike_p2_pfs_dh_grp" ] = v
811
811
}
812
812
if v := ikePhase2Show ["ike-p2-rekey-time" ]; v != nil {
813
- ikePhase2State ["ike_p2_rekey_time" ] = v
813
+ ikePhase2State ["ike_p2_rekey_time" ] = strconv . Itoa ( int ( v .( float64 )))
814
814
}
815
815
granularEncryptionState ["ike_phase_2" ] = ikePhase2State
816
816
}
817
817
granularEncryptionsState = append (granularEncryptionsState , granularEncryptionState )
818
818
}
819
819
_ = d .Set ("granular_encryptions" , granularEncryptionsState )
820
- }else {
820
+ } else {
821
821
_ = d .Set ("granular_encryptions" , nil )
822
822
}
823
823
}
@@ -1055,7 +1055,7 @@ func updateManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) err
1055
1055
ikePhase1Payload ["diffie-hellman-group" ] = v .(string )
1056
1056
}
1057
1057
if v , ok := d .GetOk ("granular_encryptions." + strconv .Itoa (i ) + ".ike_phase_1.ike_p1_rekey_time" ); ok {
1058
- ikePhase1Payload ["ike-p1-rekey-time" ] = v .(int )
1058
+ ikePhase1Payload ["ike-p1-rekey-time" ] = v .(string )
1059
1059
}
1060
1060
payload ["ike-phase-1" ] = ikePhase1Payload
1061
1061
}
@@ -1074,15 +1074,15 @@ func updateManagementVpnCommunityStar(d *schema.ResourceData, m interface{}) err
1074
1074
ikePhase2Payload ["ike-p2-pfs-dh-grp" ] = v .(bool )
1075
1075
}
1076
1076
if v , ok := d .GetOk ("granular_encryptions." + strconv .Itoa (i ) + ".ike_phase_2.ike_p2_rekey_time" ); ok {
1077
- ikePhase2Payload ["ike-p2-rekey-time" ] = v .(int )
1077
+ ikePhase2Payload ["ike-p2-rekey-time" ] = v .(string )
1078
1078
}
1079
1079
payload ["ike-phase-2" ] = ikePhase2Payload
1080
1080
}
1081
1081
granularEncryptionsPayload = append (granularEncryptionsPayload , payload )
1082
1082
}
1083
1083
vpnCommunityStar ["granular-encryptions" ] = granularEncryptionsPayload
1084
1084
}
1085
- }else {
1085
+ } else {
1086
1086
granularEncryptions , _ := d .GetChange ("granular_encryptions" )
1087
1087
oldValues := granularEncryptions .([]interface {})
1088
1088
if len (oldValues ) > 0 {
0 commit comments