/
static.go
651 lines (579 loc) · 29.6 KB
/
static.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package router
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/internal"
)
// Configure IPv4 static routing tables.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/router"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := router.NewStatic(ctx, "trname", &router.StaticArgs{
// Bfd: pulumi.String("disable"),
// Blackhole: pulumi.String("disable"),
// Device: pulumi.String("port4"),
// Distance: pulumi.Int(10),
// Dst: pulumi.String("1.0.0.0 255.240.0.0"),
// DynamicGateway: pulumi.String("disable"),
// Gateway: pulumi.String("0.0.0.0"),
// InternetService: pulumi.Int(0),
// LinkMonitorExempt: pulumi.String("disable"),
// Priority: pulumi.Int(22),
// SeqNum: pulumi.Int(1),
// Src: pulumi.String("0.0.0.0 0.0.0.0"),
// Status: pulumi.String("enable"),
// VirtualWanLink: pulumi.String("disable"),
// Vrf: pulumi.Int(0),
// Weight: pulumi.Int(2),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// Router Static can be imported using any of these accepted formats:
//
// ```sh
// $ pulumi import fortios:router/static:Static labelname {{seq_num}}
// ```
//
// If you do not want to import arguments of block:
//
// $ export "FORTIOS_IMPORT_TABLE"="false"
//
// ```sh
// $ pulumi import fortios:router/static:Static labelname {{seq_num}}
// ```
//
// $ unset "FORTIOS_IMPORT_TABLE"
type Static struct {
pulumi.CustomResourceState
// Enable/disable Bidirectional Forwarding Detection (BFD). Valid values: `enable`, `disable`.
Bfd pulumi.StringOutput `pulumi:"bfd"`
// Enable/disable black hole. Valid values: `enable`, `disable`.
Blackhole pulumi.StringOutput `pulumi:"blackhole"`
// Optional comments.
Comment pulumi.StringPtrOutput `pulumi:"comment"`
// Gateway out interface or tunnel.
Device pulumi.StringOutput `pulumi:"device"`
// Administrative distance (1 - 255).
Distance pulumi.IntOutput `pulumi:"distance"`
// Destination IP and mask for this route.
Dst pulumi.StringOutput `pulumi:"dst"`
// Name of firewall address or address group.
Dstaddr pulumi.StringOutput `pulumi:"dstaddr"`
// Enable use of dynamic gateway retrieved from a DHCP or PPP server. Valid values: `enable`, `disable`.
DynamicGateway pulumi.StringOutput `pulumi:"dynamicGateway"`
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable pulumi.StringPtrOutput `pulumi:"dynamicSortSubtable"`
// Gateway IP for this route.
Gateway pulumi.StringOutput `pulumi:"gateway"`
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables pulumi.StringPtrOutput `pulumi:"getAllTables"`
// Application ID in the Internet service database.
InternetService pulumi.IntOutput `pulumi:"internetService"`
// Application name in the Internet service custom database.
InternetServiceCustom pulumi.StringOutput `pulumi:"internetServiceCustom"`
// Enable/disable withdrawing this route when link monitor or health check is down. Valid values: `enable`, `disable`.
LinkMonitorExempt pulumi.StringOutput `pulumi:"linkMonitorExempt"`
// Preferred source IP for this route.
PreferredSource pulumi.StringOutput `pulumi:"preferredSource"`
// Administrative priority. On FortiOS versions 6.2.0-6.4.1: 0 - 4294967295. On FortiOS versions 6.4.2-7.0.3: 0 - 65535. On FortiOS versions >= 7.0.4: 1 - 65535.
Priority pulumi.IntOutput `pulumi:"priority"`
// Enable/disable egress through SD-WAN. Valid values: `enable`, `disable`.
Sdwan pulumi.StringOutput `pulumi:"sdwan"`
// Choose SD-WAN Zone. The structure of `sdwanZone` block is documented below.
SdwanZones StaticSdwanZoneArrayOutput `pulumi:"sdwanZones"`
// Sequence number.
SeqNum pulumi.IntOutput `pulumi:"seqNum"`
// Source prefix for this route.
Src pulumi.StringOutput `pulumi:"src"`
// Enable/disable this static route. Valid values: `enable`, `disable`.
Status pulumi.StringOutput `pulumi:"status"`
// Route tag.
Tag pulumi.IntOutput `pulumi:"tag"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrOutput `pulumi:"vdomparam"`
// Enable/disable egress through the virtual-wan-link. Valid values: `enable`, `disable`.
VirtualWanLink pulumi.StringOutput `pulumi:"virtualWanLink"`
// Virtual Routing Forwarding ID.
Vrf pulumi.IntOutput `pulumi:"vrf"`
// Administrative weight (0 - 255).
Weight pulumi.IntOutput `pulumi:"weight"`
}
// NewStatic registers a new resource with the given unique name, arguments, and options.
func NewStatic(ctx *pulumi.Context,
name string, args *StaticArgs, opts ...pulumi.ResourceOption) (*Static, error) {
if args == nil {
args = &StaticArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Static
err := ctx.RegisterResource("fortios:router/static:Static", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStatic gets an existing Static resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetStatic(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StaticState, opts ...pulumi.ResourceOption) (*Static, error) {
var resource Static
err := ctx.ReadResource("fortios:router/static:Static", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Static resources.
type staticState struct {
// Enable/disable Bidirectional Forwarding Detection (BFD). Valid values: `enable`, `disable`.
Bfd *string `pulumi:"bfd"`
// Enable/disable black hole. Valid values: `enable`, `disable`.
Blackhole *string `pulumi:"blackhole"`
// Optional comments.
Comment *string `pulumi:"comment"`
// Gateway out interface or tunnel.
Device *string `pulumi:"device"`
// Administrative distance (1 - 255).
Distance *int `pulumi:"distance"`
// Destination IP and mask for this route.
Dst *string `pulumi:"dst"`
// Name of firewall address or address group.
Dstaddr *string `pulumi:"dstaddr"`
// Enable use of dynamic gateway retrieved from a DHCP or PPP server. Valid values: `enable`, `disable`.
DynamicGateway *string `pulumi:"dynamicGateway"`
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable *string `pulumi:"dynamicSortSubtable"`
// Gateway IP for this route.
Gateway *string `pulumi:"gateway"`
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables *string `pulumi:"getAllTables"`
// Application ID in the Internet service database.
InternetService *int `pulumi:"internetService"`
// Application name in the Internet service custom database.
InternetServiceCustom *string `pulumi:"internetServiceCustom"`
// Enable/disable withdrawing this route when link monitor or health check is down. Valid values: `enable`, `disable`.
LinkMonitorExempt *string `pulumi:"linkMonitorExempt"`
// Preferred source IP for this route.
PreferredSource *string `pulumi:"preferredSource"`
// Administrative priority. On FortiOS versions 6.2.0-6.4.1: 0 - 4294967295. On FortiOS versions 6.4.2-7.0.3: 0 - 65535. On FortiOS versions >= 7.0.4: 1 - 65535.
Priority *int `pulumi:"priority"`
// Enable/disable egress through SD-WAN. Valid values: `enable`, `disable`.
Sdwan *string `pulumi:"sdwan"`
// Choose SD-WAN Zone. The structure of `sdwanZone` block is documented below.
SdwanZones []StaticSdwanZone `pulumi:"sdwanZones"`
// Sequence number.
SeqNum *int `pulumi:"seqNum"`
// Source prefix for this route.
Src *string `pulumi:"src"`
// Enable/disable this static route. Valid values: `enable`, `disable`.
Status *string `pulumi:"status"`
// Route tag.
Tag *int `pulumi:"tag"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam *string `pulumi:"vdomparam"`
// Enable/disable egress through the virtual-wan-link. Valid values: `enable`, `disable`.
VirtualWanLink *string `pulumi:"virtualWanLink"`
// Virtual Routing Forwarding ID.
Vrf *int `pulumi:"vrf"`
// Administrative weight (0 - 255).
Weight *int `pulumi:"weight"`
}
type StaticState struct {
// Enable/disable Bidirectional Forwarding Detection (BFD). Valid values: `enable`, `disable`.
Bfd pulumi.StringPtrInput
// Enable/disable black hole. Valid values: `enable`, `disable`.
Blackhole pulumi.StringPtrInput
// Optional comments.
Comment pulumi.StringPtrInput
// Gateway out interface or tunnel.
Device pulumi.StringPtrInput
// Administrative distance (1 - 255).
Distance pulumi.IntPtrInput
// Destination IP and mask for this route.
Dst pulumi.StringPtrInput
// Name of firewall address or address group.
Dstaddr pulumi.StringPtrInput
// Enable use of dynamic gateway retrieved from a DHCP or PPP server. Valid values: `enable`, `disable`.
DynamicGateway pulumi.StringPtrInput
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable pulumi.StringPtrInput
// Gateway IP for this route.
Gateway pulumi.StringPtrInput
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables pulumi.StringPtrInput
// Application ID in the Internet service database.
InternetService pulumi.IntPtrInput
// Application name in the Internet service custom database.
InternetServiceCustom pulumi.StringPtrInput
// Enable/disable withdrawing this route when link monitor or health check is down. Valid values: `enable`, `disable`.
LinkMonitorExempt pulumi.StringPtrInput
// Preferred source IP for this route.
PreferredSource pulumi.StringPtrInput
// Administrative priority. On FortiOS versions 6.2.0-6.4.1: 0 - 4294967295. On FortiOS versions 6.4.2-7.0.3: 0 - 65535. On FortiOS versions >= 7.0.4: 1 - 65535.
Priority pulumi.IntPtrInput
// Enable/disable egress through SD-WAN. Valid values: `enable`, `disable`.
Sdwan pulumi.StringPtrInput
// Choose SD-WAN Zone. The structure of `sdwanZone` block is documented below.
SdwanZones StaticSdwanZoneArrayInput
// Sequence number.
SeqNum pulumi.IntPtrInput
// Source prefix for this route.
Src pulumi.StringPtrInput
// Enable/disable this static route. Valid values: `enable`, `disable`.
Status pulumi.StringPtrInput
// Route tag.
Tag pulumi.IntPtrInput
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrInput
// Enable/disable egress through the virtual-wan-link. Valid values: `enable`, `disable`.
VirtualWanLink pulumi.StringPtrInput
// Virtual Routing Forwarding ID.
Vrf pulumi.IntPtrInput
// Administrative weight (0 - 255).
Weight pulumi.IntPtrInput
}
func (StaticState) ElementType() reflect.Type {
return reflect.TypeOf((*staticState)(nil)).Elem()
}
type staticArgs struct {
// Enable/disable Bidirectional Forwarding Detection (BFD). Valid values: `enable`, `disable`.
Bfd *string `pulumi:"bfd"`
// Enable/disable black hole. Valid values: `enable`, `disable`.
Blackhole *string `pulumi:"blackhole"`
// Optional comments.
Comment *string `pulumi:"comment"`
// Gateway out interface or tunnel.
Device *string `pulumi:"device"`
// Administrative distance (1 - 255).
Distance *int `pulumi:"distance"`
// Destination IP and mask for this route.
Dst *string `pulumi:"dst"`
// Name of firewall address or address group.
Dstaddr *string `pulumi:"dstaddr"`
// Enable use of dynamic gateway retrieved from a DHCP or PPP server. Valid values: `enable`, `disable`.
DynamicGateway *string `pulumi:"dynamicGateway"`
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable *string `pulumi:"dynamicSortSubtable"`
// Gateway IP for this route.
Gateway *string `pulumi:"gateway"`
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables *string `pulumi:"getAllTables"`
// Application ID in the Internet service database.
InternetService *int `pulumi:"internetService"`
// Application name in the Internet service custom database.
InternetServiceCustom *string `pulumi:"internetServiceCustom"`
// Enable/disable withdrawing this route when link monitor or health check is down. Valid values: `enable`, `disable`.
LinkMonitorExempt *string `pulumi:"linkMonitorExempt"`
// Preferred source IP for this route.
PreferredSource *string `pulumi:"preferredSource"`
// Administrative priority. On FortiOS versions 6.2.0-6.4.1: 0 - 4294967295. On FortiOS versions 6.4.2-7.0.3: 0 - 65535. On FortiOS versions >= 7.0.4: 1 - 65535.
Priority *int `pulumi:"priority"`
// Enable/disable egress through SD-WAN. Valid values: `enable`, `disable`.
Sdwan *string `pulumi:"sdwan"`
// Choose SD-WAN Zone. The structure of `sdwanZone` block is documented below.
SdwanZones []StaticSdwanZone `pulumi:"sdwanZones"`
// Sequence number.
SeqNum *int `pulumi:"seqNum"`
// Source prefix for this route.
Src *string `pulumi:"src"`
// Enable/disable this static route. Valid values: `enable`, `disable`.
Status *string `pulumi:"status"`
// Route tag.
Tag *int `pulumi:"tag"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam *string `pulumi:"vdomparam"`
// Enable/disable egress through the virtual-wan-link. Valid values: `enable`, `disable`.
VirtualWanLink *string `pulumi:"virtualWanLink"`
// Virtual Routing Forwarding ID.
Vrf *int `pulumi:"vrf"`
// Administrative weight (0 - 255).
Weight *int `pulumi:"weight"`
}
// The set of arguments for constructing a Static resource.
type StaticArgs struct {
// Enable/disable Bidirectional Forwarding Detection (BFD). Valid values: `enable`, `disable`.
Bfd pulumi.StringPtrInput
// Enable/disable black hole. Valid values: `enable`, `disable`.
Blackhole pulumi.StringPtrInput
// Optional comments.
Comment pulumi.StringPtrInput
// Gateway out interface or tunnel.
Device pulumi.StringPtrInput
// Administrative distance (1 - 255).
Distance pulumi.IntPtrInput
// Destination IP and mask for this route.
Dst pulumi.StringPtrInput
// Name of firewall address or address group.
Dstaddr pulumi.StringPtrInput
// Enable use of dynamic gateway retrieved from a DHCP or PPP server. Valid values: `enable`, `disable`.
DynamicGateway pulumi.StringPtrInput
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable pulumi.StringPtrInput
// Gateway IP for this route.
Gateway pulumi.StringPtrInput
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables pulumi.StringPtrInput
// Application ID in the Internet service database.
InternetService pulumi.IntPtrInput
// Application name in the Internet service custom database.
InternetServiceCustom pulumi.StringPtrInput
// Enable/disable withdrawing this route when link monitor or health check is down. Valid values: `enable`, `disable`.
LinkMonitorExempt pulumi.StringPtrInput
// Preferred source IP for this route.
PreferredSource pulumi.StringPtrInput
// Administrative priority. On FortiOS versions 6.2.0-6.4.1: 0 - 4294967295. On FortiOS versions 6.4.2-7.0.3: 0 - 65535. On FortiOS versions >= 7.0.4: 1 - 65535.
Priority pulumi.IntPtrInput
// Enable/disable egress through SD-WAN. Valid values: `enable`, `disable`.
Sdwan pulumi.StringPtrInput
// Choose SD-WAN Zone. The structure of `sdwanZone` block is documented below.
SdwanZones StaticSdwanZoneArrayInput
// Sequence number.
SeqNum pulumi.IntPtrInput
// Source prefix for this route.
Src pulumi.StringPtrInput
// Enable/disable this static route. Valid values: `enable`, `disable`.
Status pulumi.StringPtrInput
// Route tag.
Tag pulumi.IntPtrInput
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrInput
// Enable/disable egress through the virtual-wan-link. Valid values: `enable`, `disable`.
VirtualWanLink pulumi.StringPtrInput
// Virtual Routing Forwarding ID.
Vrf pulumi.IntPtrInput
// Administrative weight (0 - 255).
Weight pulumi.IntPtrInput
}
func (StaticArgs) ElementType() reflect.Type {
return reflect.TypeOf((*staticArgs)(nil)).Elem()
}
type StaticInput interface {
pulumi.Input
ToStaticOutput() StaticOutput
ToStaticOutputWithContext(ctx context.Context) StaticOutput
}
func (*Static) ElementType() reflect.Type {
return reflect.TypeOf((**Static)(nil)).Elem()
}
func (i *Static) ToStaticOutput() StaticOutput {
return i.ToStaticOutputWithContext(context.Background())
}
func (i *Static) ToStaticOutputWithContext(ctx context.Context) StaticOutput {
return pulumi.ToOutputWithContext(ctx, i).(StaticOutput)
}
// StaticArrayInput is an input type that accepts StaticArray and StaticArrayOutput values.
// You can construct a concrete instance of `StaticArrayInput` via:
//
// StaticArray{ StaticArgs{...} }
type StaticArrayInput interface {
pulumi.Input
ToStaticArrayOutput() StaticArrayOutput
ToStaticArrayOutputWithContext(context.Context) StaticArrayOutput
}
type StaticArray []StaticInput
func (StaticArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Static)(nil)).Elem()
}
func (i StaticArray) ToStaticArrayOutput() StaticArrayOutput {
return i.ToStaticArrayOutputWithContext(context.Background())
}
func (i StaticArray) ToStaticArrayOutputWithContext(ctx context.Context) StaticArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StaticArrayOutput)
}
// StaticMapInput is an input type that accepts StaticMap and StaticMapOutput values.
// You can construct a concrete instance of `StaticMapInput` via:
//
// StaticMap{ "key": StaticArgs{...} }
type StaticMapInput interface {
pulumi.Input
ToStaticMapOutput() StaticMapOutput
ToStaticMapOutputWithContext(context.Context) StaticMapOutput
}
type StaticMap map[string]StaticInput
func (StaticMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Static)(nil)).Elem()
}
func (i StaticMap) ToStaticMapOutput() StaticMapOutput {
return i.ToStaticMapOutputWithContext(context.Background())
}
func (i StaticMap) ToStaticMapOutputWithContext(ctx context.Context) StaticMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StaticMapOutput)
}
type StaticOutput struct{ *pulumi.OutputState }
func (StaticOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Static)(nil)).Elem()
}
func (o StaticOutput) ToStaticOutput() StaticOutput {
return o
}
func (o StaticOutput) ToStaticOutputWithContext(ctx context.Context) StaticOutput {
return o
}
// Enable/disable Bidirectional Forwarding Detection (BFD). Valid values: `enable`, `disable`.
func (o StaticOutput) Bfd() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.Bfd }).(pulumi.StringOutput)
}
// Enable/disable black hole. Valid values: `enable`, `disable`.
func (o StaticOutput) Blackhole() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.Blackhole }).(pulumi.StringOutput)
}
// Optional comments.
func (o StaticOutput) Comment() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Static) pulumi.StringPtrOutput { return v.Comment }).(pulumi.StringPtrOutput)
}
// Gateway out interface or tunnel.
func (o StaticOutput) Device() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.Device }).(pulumi.StringOutput)
}
// Administrative distance (1 - 255).
func (o StaticOutput) Distance() pulumi.IntOutput {
return o.ApplyT(func(v *Static) pulumi.IntOutput { return v.Distance }).(pulumi.IntOutput)
}
// Destination IP and mask for this route.
func (o StaticOutput) Dst() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.Dst }).(pulumi.StringOutput)
}
// Name of firewall address or address group.
func (o StaticOutput) Dstaddr() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.Dstaddr }).(pulumi.StringOutput)
}
// Enable use of dynamic gateway retrieved from a DHCP or PPP server. Valid values: `enable`, `disable`.
func (o StaticOutput) DynamicGateway() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.DynamicGateway }).(pulumi.StringOutput)
}
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
func (o StaticOutput) DynamicSortSubtable() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Static) pulumi.StringPtrOutput { return v.DynamicSortSubtable }).(pulumi.StringPtrOutput)
}
// Gateway IP for this route.
func (o StaticOutput) Gateway() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.Gateway }).(pulumi.StringOutput)
}
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
func (o StaticOutput) GetAllTables() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Static) pulumi.StringPtrOutput { return v.GetAllTables }).(pulumi.StringPtrOutput)
}
// Application ID in the Internet service database.
func (o StaticOutput) InternetService() pulumi.IntOutput {
return o.ApplyT(func(v *Static) pulumi.IntOutput { return v.InternetService }).(pulumi.IntOutput)
}
// Application name in the Internet service custom database.
func (o StaticOutput) InternetServiceCustom() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.InternetServiceCustom }).(pulumi.StringOutput)
}
// Enable/disable withdrawing this route when link monitor or health check is down. Valid values: `enable`, `disable`.
func (o StaticOutput) LinkMonitorExempt() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.LinkMonitorExempt }).(pulumi.StringOutput)
}
// Preferred source IP for this route.
func (o StaticOutput) PreferredSource() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.PreferredSource }).(pulumi.StringOutput)
}
// Administrative priority. On FortiOS versions 6.2.0-6.4.1: 0 - 4294967295. On FortiOS versions 6.4.2-7.0.3: 0 - 65535. On FortiOS versions >= 7.0.4: 1 - 65535.
func (o StaticOutput) Priority() pulumi.IntOutput {
return o.ApplyT(func(v *Static) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput)
}
// Enable/disable egress through SD-WAN. Valid values: `enable`, `disable`.
func (o StaticOutput) Sdwan() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.Sdwan }).(pulumi.StringOutput)
}
// Choose SD-WAN Zone. The structure of `sdwanZone` block is documented below.
func (o StaticOutput) SdwanZones() StaticSdwanZoneArrayOutput {
return o.ApplyT(func(v *Static) StaticSdwanZoneArrayOutput { return v.SdwanZones }).(StaticSdwanZoneArrayOutput)
}
// Sequence number.
func (o StaticOutput) SeqNum() pulumi.IntOutput {
return o.ApplyT(func(v *Static) pulumi.IntOutput { return v.SeqNum }).(pulumi.IntOutput)
}
// Source prefix for this route.
func (o StaticOutput) Src() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.Src }).(pulumi.StringOutput)
}
// Enable/disable this static route. Valid values: `enable`, `disable`.
func (o StaticOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// Route tag.
func (o StaticOutput) Tag() pulumi.IntOutput {
return o.ApplyT(func(v *Static) pulumi.IntOutput { return v.Tag }).(pulumi.IntOutput)
}
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
func (o StaticOutput) Vdomparam() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Static) pulumi.StringPtrOutput { return v.Vdomparam }).(pulumi.StringPtrOutput)
}
// Enable/disable egress through the virtual-wan-link. Valid values: `enable`, `disable`.
func (o StaticOutput) VirtualWanLink() pulumi.StringOutput {
return o.ApplyT(func(v *Static) pulumi.StringOutput { return v.VirtualWanLink }).(pulumi.StringOutput)
}
// Virtual Routing Forwarding ID.
func (o StaticOutput) Vrf() pulumi.IntOutput {
return o.ApplyT(func(v *Static) pulumi.IntOutput { return v.Vrf }).(pulumi.IntOutput)
}
// Administrative weight (0 - 255).
func (o StaticOutput) Weight() pulumi.IntOutput {
return o.ApplyT(func(v *Static) pulumi.IntOutput { return v.Weight }).(pulumi.IntOutput)
}
type StaticArrayOutput struct{ *pulumi.OutputState }
func (StaticArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Static)(nil)).Elem()
}
func (o StaticArrayOutput) ToStaticArrayOutput() StaticArrayOutput {
return o
}
func (o StaticArrayOutput) ToStaticArrayOutputWithContext(ctx context.Context) StaticArrayOutput {
return o
}
func (o StaticArrayOutput) Index(i pulumi.IntInput) StaticOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Static {
return vs[0].([]*Static)[vs[1].(int)]
}).(StaticOutput)
}
type StaticMapOutput struct{ *pulumi.OutputState }
func (StaticMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Static)(nil)).Elem()
}
func (o StaticMapOutput) ToStaticMapOutput() StaticMapOutput {
return o
}
func (o StaticMapOutput) ToStaticMapOutputWithContext(ctx context.Context) StaticMapOutput {
return o
}
func (o StaticMapOutput) MapIndex(k pulumi.StringInput) StaticOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Static {
return vs[0].(map[string]*Static)[vs[1].(string)]
}).(StaticOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StaticInput)(nil)).Elem(), &Static{})
pulumi.RegisterInputType(reflect.TypeOf((*StaticArrayInput)(nil)).Elem(), StaticArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StaticMapInput)(nil)).Elem(), StaticMap{})
pulumi.RegisterOutputType(StaticOutput{})
pulumi.RegisterOutputType(StaticArrayOutput{})
pulumi.RegisterOutputType(StaticMapOutput{})
}