@@ -61,6 +61,11 @@ func dataSourceManagementVpnCommunityMeshed() *schema.Resource {
61
61
Computed : true ,
62
62
Description : "The encryption algorithm to be used." ,
63
63
},
64
+ "ike_p1_rekey_time" : {
65
+ Type : schema .TypeInt ,
66
+ Computed : true ,
67
+ Description : "Indicates the time interval for IKE phase 1 renegotiation." ,
68
+ },
64
69
},
65
70
},
66
71
},
@@ -80,6 +85,21 @@ func dataSourceManagementVpnCommunityMeshed() *schema.Resource {
80
85
Computed : true ,
81
86
Description : "The encryption algorithm to be used." ,
82
87
},
88
+ "ike_p2_use_pfs" : {
89
+ Type : schema .TypeBool ,
90
+ Computed : true ,
91
+ Description : "Indicates whether Perfect Forward Secrecy (PFS) is being used for IKE phase 2." ,
92
+ },
93
+ "ike_p2_pfs_dh_grp" : {
94
+ Type : schema .TypeString ,
95
+ Computed : true ,
96
+ Description : "The Diffie-Hellman group to be used." ,
97
+ },
98
+ "ike_p2_rekey_time" : {
99
+ Type : schema .TypeInt ,
100
+ Computed : true ,
101
+ Description : "Indicates the time interval for IKE phase 2 renegotiation." ,
102
+ },
83
103
},
84
104
},
85
105
},
@@ -121,6 +141,104 @@ func dataSourceManagementVpnCommunityMeshed() *schema.Resource {
121
141
},
122
142
},
123
143
},
144
+ "tunnel_granularity" : {
145
+ Type : schema .TypeString ,
146
+ Computed : true ,
147
+ Description : "VPN tunnel sharing option to be used." ,
148
+ },
149
+ "granular_encryptions" : {
150
+ Type : schema .TypeList ,
151
+ Computed : true ,
152
+ Description : "VPN granular encryption settings." ,
153
+ Elem : & schema.Resource {
154
+ Schema : map [string ]* schema.Schema {
155
+ "internal_gateway" : {
156
+ Type : schema .TypeString ,
157
+ Computed : true ,
158
+ Description : "Internally managed Check Point gateway identified by name or UID, or 'Any' for all internal-gateways participants in this community." ,
159
+ },
160
+ "external_gateway" : {
161
+ Type : schema .TypeString ,
162
+ Computed : true ,
163
+ Description : "Externally managed or 3rd party gateway identified by name or UID." ,
164
+ },
165
+ "encryption_method" : {
166
+ Type : schema .TypeString ,
167
+ Computed : true ,
168
+ Description : "The encryption method to be used." ,
169
+ },
170
+ "encryption_suite" : {
171
+ Type : schema .TypeString ,
172
+ Computed : true ,
173
+ Description : "The encryption suite to be used." ,
174
+ },
175
+ "ike_phase_1" : {
176
+ Type : schema .TypeMap ,
177
+ Computed : true ,
178
+ Description : "Ike Phase 1 settings. Only applicable when the encryption-suite is set to [custom]." ,
179
+ Elem : & schema.Resource {
180
+ Schema : map [string ]* schema.Schema {
181
+ "data_integrity" : {
182
+ Type : schema .TypeString ,
183
+ Computed : true ,
184
+ Description : "The hash algorithm to be used." ,
185
+ },
186
+ "diffie_hellman_group" : {
187
+ Type : schema .TypeString ,
188
+ Computed : true ,
189
+ Description : "The Diffie-Hellman group to be used." ,
190
+ },
191
+ "encryption_algorithm" : {
192
+ Type : schema .TypeString ,
193
+ Computed : true ,
194
+ Description : "The encryption algorithm to be used." ,
195
+ },
196
+ "ike_p1_rekey_time" : {
197
+ Type : schema .TypeInt ,
198
+ Computed : true ,
199
+ Description : "Indicates the time interval for IKE phase 1 renegotiation." ,
200
+ },
201
+ },
202
+ },
203
+ },
204
+ "ike_phase_2" : {
205
+ Type : schema .TypeMap ,
206
+ Computed : true ,
207
+ Description : "Ike Phase 2 settings. Only applicable when the encryption-suite is set to [custom]." ,
208
+ Elem : & schema.Resource {
209
+ Schema : map [string ]* schema.Schema {
210
+ "data_integrity" : {
211
+ Type : schema .TypeString ,
212
+ Computed : true ,
213
+ Description : "The hash algorithm to be used." ,
214
+ Default : "sha1" ,
215
+ },
216
+ "encryption_algorithm" : {
217
+ Type : schema .TypeString ,
218
+ Computed : true ,
219
+ Description : "The encryption algorithm to be used." ,
220
+ },
221
+ "ike_p2_use_pfs" : {
222
+ Type : schema .TypeBool ,
223
+ Computed : true ,
224
+ Description : "Indicates whether Perfect Forward Secrecy (PFS) is being used for IKE phase 2." ,
225
+ },
226
+ "ike_p2_pfs_dh_grp" : {
227
+ Type : schema .TypeString ,
228
+ Computed : true ,
229
+ Description : "The Diffie-Hellman group to be used." ,
230
+ },
231
+ "ike_p2_rekey_time" : {
232
+ Type : schema .TypeInt ,
233
+ Computed : true ,
234
+ Description : "Indicates the time interval for IKE phase 2 renegotiation." ,
235
+ },
236
+ },
237
+ },
238
+ },
239
+ },
240
+ },
241
+ },
124
242
"tags" : {
125
243
Type : schema .TypeSet ,
126
244
Computed : true ,
@@ -223,7 +341,9 @@ func dataSourceManagementVpnCommunityMeshedRead(d *schema.ResourceData, m interf
223
341
if v , _ := ikePhase1Map ["encryption-algorithm" ]; v != nil {
224
342
ikePhase1MapToReturn ["encryption_algorithm" ] = v
225
343
}
226
-
344
+ if v := ikePhase1Map ["ike-p1-rekey-time" ]; v != nil {
345
+ ikePhase1MapToReturn ["ike_p1_rekey_time" ] = v
346
+ }
227
347
_ , ikePhase1InConf := d .GetOk ("ike_phase_1" )
228
348
defaultIkePhase1 := map [string ]interface {}{"encryption_algorithm" : "aes-256" , "diffie_hellman_group" : "group-2" , "data_integrity" : "sha1" }
229
349
if reflect .DeepEqual (defaultIkePhase1 , ikePhase1MapToReturn ) && ! ikePhase1InConf {
@@ -248,7 +368,15 @@ func dataSourceManagementVpnCommunityMeshedRead(d *schema.ResourceData, m interf
248
368
if v , _ := ikePhase2Map ["encryption-algorithm" ]; v != nil {
249
369
ikePhase2MapToReturn ["encryption_algorithm" ] = v
250
370
}
251
-
371
+ if v := ikePhase2Map ["ike-p2-use-pfs" ]; v != nil {
372
+ ikePhase2MapToReturn ["ike_p2_use_pfs" ] = v
373
+ }
374
+ if v := ikePhase2Map ["ike-p2-pfs-dh-grp" ]; v != nil {
375
+ ikePhase2MapToReturn ["ike_p2_pfs_dh_grp" ] = v
376
+ }
377
+ if v := ikePhase2Map ["ike-p2-rekey-time" ]; v != nil {
378
+ ikePhase2MapToReturn ["ike_p2_rekey_time" ] = v
379
+ }
252
380
_ , ikePhase2InConf := d .GetOk ("ike_phase_2" )
253
381
defaultIkePhase2 := map [string ]interface {}{"encryption_algorithm" : "aes-128" , "data_integrity" : "sha1" }
254
382
if reflect .DeepEqual (defaultIkePhase2 , ikePhase2MapToReturn ) && ! ikePhase2InConf {
@@ -317,6 +445,99 @@ func dataSourceManagementVpnCommunityMeshedRead(d *schema.ResourceData, m interf
317
445
}
318
446
}
319
447
448
+ if v := vpnCommunityMeshed ["tunnel-granularity" ]; v != nil {
449
+ _ = d .Set ("tunnel_granularity" , v )
450
+ }
451
+
452
+ if vpnCommunityMeshed ["granular-encryptions" ] != nil {
453
+ granularEncryptions , ok := vpnCommunityMeshed ["granular-encryptions" ].([]interface {})
454
+ if ok {
455
+ if len (granularEncryptions ) > 0 {
456
+ var granularEncryptionsState []map [string ]interface {}
457
+ for i := range granularEncryptions {
458
+ granularEncryptionShow := granularEncryptions [i ].(map [string ]interface {})
459
+ granularEncryptionState := make (map [string ]interface {})
460
+ if granularEncryptionShow ["internal-gateway" ] != nil {
461
+ var internalGatewayName string
462
+ v := granularEncryptionShow ["internal-gateway" ]
463
+ if obj , ok := v .(map [string ]interface {}); ok {
464
+ if obj ["name" ] != nil {
465
+ internalGatewayName = obj ["name" ].(string )
466
+ }
467
+ }else if val , ok := v .(string ); ok {
468
+ internalGatewayName = val
469
+ }
470
+ granularEncryptionState ["internal_gateway" ] = internalGatewayName
471
+ }
472
+
473
+ if granularEncryptionShow ["external-gateway" ] != nil {
474
+ var externalGatewayName string
475
+ v := granularEncryptionShow ["external-gateway" ]
476
+ if obj , ok := v .(map [string ]interface {}); ok {
477
+ if obj ["name" ] != nil {
478
+ externalGatewayName = obj ["name" ].(string )
479
+ }
480
+ }else if val , ok := v .(string ); ok {
481
+ externalGatewayName = val
482
+ }
483
+ granularEncryptionState ["external_gateway" ] = externalGatewayName
484
+ }
485
+
486
+ if v := granularEncryptionShow ["encryption-method" ]; v != nil {
487
+ granularEncryptionState ["encryption_method" ] = v
488
+ }
489
+
490
+ if v := granularEncryptionShow ["encryption-suite" ]; v != nil {
491
+ granularEncryptionState ["encryption_suite" ] = v
492
+ }
493
+
494
+ if v := granularEncryptionShow ["ike-phase-1" ]; v != nil {
495
+ ikePhase1Show := v .(map [string ]interface {})
496
+ ikePhase1State := make (map [string ]interface {})
497
+ if v := ikePhase1Show ["encryption-algorithm" ]; v != nil {
498
+ ikePhase1State ["encryption_algorithm" ] = v
499
+ }
500
+ if v := ikePhase1Show ["data-integrity" ]; v != nil {
501
+ ikePhase1State ["data_integrity" ] = v
502
+ }
503
+ if v := ikePhase1Show ["diffie-hellman-group" ]; v != nil {
504
+ ikePhase1State ["diffie_hellman_group" ] = v
505
+ }
506
+ if v := ikePhase1Show ["ike-p1-rekey-time" ]; v != nil {
507
+ ikePhase1State ["ike_p1_rekey_time" ] = v
508
+ }
509
+ granularEncryptionState ["ike_phase_1" ] = ikePhase1State
510
+ }
511
+
512
+ if v := granularEncryptionShow ["ike-phase-2" ]; v != nil {
513
+ ikePhase2Show := v .(map [string ]interface {})
514
+ ikePhase2State := make (map [string ]interface {})
515
+ if v := ikePhase2Show ["encryption-algorithm" ]; v != nil {
516
+ ikePhase2State ["encryption_algorithm" ] = v
517
+ }
518
+ if v := ikePhase2Show ["data-integrity" ]; v != nil {
519
+ ikePhase2State ["data_integrity" ] = v
520
+ }
521
+ if v := ikePhase2Show ["ike-p2-use-pfs" ]; v != nil {
522
+ ikePhase2State ["ike_p2_use_pfs" ] = v
523
+ }
524
+ if v := ikePhase2Show ["ike-p2-pfs-dh-grp" ]; v != nil {
525
+ ikePhase2State ["ike_p2_pfs_dh_grp" ] = v
526
+ }
527
+ if v := ikePhase2Show ["ike-p2-rekey-time" ]; v != nil {
528
+ ikePhase2State ["ike_p2_rekey_time" ] = v
529
+ }
530
+ granularEncryptionState ["ike_phase_2" ] = ikePhase2State
531
+ }
532
+ granularEncryptionsState = append (granularEncryptionsState , granularEncryptionState )
533
+ }
534
+ _ = d .Set ("granular_encryptions" , granularEncryptionsState )
535
+ }else {
536
+ _ = d .Set ("granular_encryptions" , nil )
537
+ }
538
+ }
539
+ }
540
+
320
541
if vpnCommunityMeshed ["tags" ] != nil {
321
542
tagsJson , ok := vpnCommunityMeshed ["tags" ].([]interface {})
322
543
if ok {
0 commit comments