/
centralsnatmap.go
638 lines (569 loc) · 32.2 KB
/
centralsnatmap.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
// 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 firewall
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/internal"
)
// Configure central SNAT policies.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/firewall"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := firewall.NewCentralsnatmap(ctx, "trname", &firewall.CentralsnatmapArgs{
// DstAddrs: firewall.CentralsnatmapDstAddrArray{
// &firewall.CentralsnatmapDstAddrArgs{
// Name: pulumi.String("all"),
// },
// },
// Dstintfs: firewall.CentralsnatmapDstintfArray{
// &firewall.CentralsnatmapDstintfArgs{
// Name: pulumi.String("port3"),
// },
// },
// Nat: pulumi.String("enable"),
// NatPort: pulumi.String("0"),
// OrigAddrs: firewall.CentralsnatmapOrigAddrArray{
// &firewall.CentralsnatmapOrigAddrArgs{
// Name: pulumi.String("all"),
// },
// },
// OrigPort: pulumi.String("0"),
// Policyid: pulumi.Int(1),
// Protocol: pulumi.Int(33),
// Srcintfs: firewall.CentralsnatmapSrcintfArray{
// &firewall.CentralsnatmapSrcintfArgs{
// Name: pulumi.String("port1"),
// },
// },
// Status: pulumi.String("enable"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// Firewall CentralSnatMap can be imported using any of these accepted formats:
//
// ```sh
// $ pulumi import fortios:firewall/centralsnatmap:Centralsnatmap labelname {{policyid}}
// ```
//
// If you do not want to import arguments of block:
//
// $ export "FORTIOS_IMPORT_TABLE"="false"
//
// ```sh
// $ pulumi import fortios:firewall/centralsnatmap:Centralsnatmap labelname {{policyid}}
// ```
//
// $ unset "FORTIOS_IMPORT_TABLE"
type Centralsnatmap struct {
pulumi.CustomResourceState
// Comment.
Comments pulumi.StringPtrOutput `pulumi:"comments"`
// IPv6 Destination address. The structure of `dstAddr6` block is documented below.
DstAddr6s CentralsnatmapDstAddr6ArrayOutput `pulumi:"dstAddr6s"`
// Destination address name from available addresses. The structure of `dstAddr` block is documented below.
DstAddrs CentralsnatmapDstAddrArrayOutput `pulumi:"dstAddrs"`
// Destination port or port range (1 to 65535, 0 means any port).
DstPort pulumi.StringOutput `pulumi:"dstPort"`
// Destination interface name from available interfaces. The structure of `dstintf` block is documented below.
Dstintfs CentralsnatmapDstintfArrayOutput `pulumi:"dstintfs"`
// 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"`
// 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"`
// Enable/disable source NAT. Valid values: `disable`, `enable`.
Nat pulumi.StringOutput `pulumi:"nat"`
// Enable/disable NAT46. Valid values: `enable`, `disable`.
Nat46 pulumi.StringOutput `pulumi:"nat46"`
// Enable/disable NAT64. Valid values: `enable`, `disable`.
Nat64 pulumi.StringOutput `pulumi:"nat64"`
// IPv6 pools to be used for source NAT. The structure of `natIppool6` block is documented below.
NatIppool6s CentralsnatmapNatIppool6ArrayOutput `pulumi:"natIppool6s"`
// Name of the IP pools to be used to translate addresses from available IP Pools. The structure of `natIppool` block is documented below.
NatIppools CentralsnatmapNatIppoolArrayOutput `pulumi:"natIppools"`
// Translated port or port range (0 to 65535, 0 means any port).
NatPort pulumi.StringOutput `pulumi:"natPort"`
// IPv6 Original address. The structure of `origAddr6` block is documented below.
OrigAddr6s CentralsnatmapOrigAddr6ArrayOutput `pulumi:"origAddr6s"`
// Original address. The structure of `origAddr` block is documented below.
OrigAddrs CentralsnatmapOrigAddrArrayOutput `pulumi:"origAddrs"`
// Original TCP port (1 to 65535, 0 means any port).
OrigPort pulumi.StringOutput `pulumi:"origPort"`
// Policy ID.
Policyid pulumi.IntOutput `pulumi:"policyid"`
// Integer value for the protocol type (0 - 255).
Protocol pulumi.IntOutput `pulumi:"protocol"`
// Source interface name from available interfaces. The structure of `srcintf` block is documented below.
Srcintfs CentralsnatmapSrcintfArrayOutput `pulumi:"srcintfs"`
// Enable/disable the active status of this policy. Valid values: `enable`, `disable`.
Status pulumi.StringOutput `pulumi:"status"`
// IPv4/IPv6 source NAT. Valid values: `ipv4`, `ipv6`.
Type pulumi.StringOutput `pulumi:"type"`
// Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
Uuid pulumi.StringOutput `pulumi:"uuid"`
// 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"`
}
// NewCentralsnatmap registers a new resource with the given unique name, arguments, and options.
func NewCentralsnatmap(ctx *pulumi.Context,
name string, args *CentralsnatmapArgs, opts ...pulumi.ResourceOption) (*Centralsnatmap, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DstAddrs == nil {
return nil, errors.New("invalid value for required argument 'DstAddrs'")
}
if args.Dstintfs == nil {
return nil, errors.New("invalid value for required argument 'Dstintfs'")
}
if args.Nat == nil {
return nil, errors.New("invalid value for required argument 'Nat'")
}
if args.OrigAddrs == nil {
return nil, errors.New("invalid value for required argument 'OrigAddrs'")
}
if args.OrigPort == nil {
return nil, errors.New("invalid value for required argument 'OrigPort'")
}
if args.Protocol == nil {
return nil, errors.New("invalid value for required argument 'Protocol'")
}
if args.Srcintfs == nil {
return nil, errors.New("invalid value for required argument 'Srcintfs'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Centralsnatmap
err := ctx.RegisterResource("fortios:firewall/centralsnatmap:Centralsnatmap", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCentralsnatmap gets an existing Centralsnatmap 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 GetCentralsnatmap(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CentralsnatmapState, opts ...pulumi.ResourceOption) (*Centralsnatmap, error) {
var resource Centralsnatmap
err := ctx.ReadResource("fortios:firewall/centralsnatmap:Centralsnatmap", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Centralsnatmap resources.
type centralsnatmapState struct {
// Comment.
Comments *string `pulumi:"comments"`
// IPv6 Destination address. The structure of `dstAddr6` block is documented below.
DstAddr6s []CentralsnatmapDstAddr6 `pulumi:"dstAddr6s"`
// Destination address name from available addresses. The structure of `dstAddr` block is documented below.
DstAddrs []CentralsnatmapDstAddr `pulumi:"dstAddrs"`
// Destination port or port range (1 to 65535, 0 means any port).
DstPort *string `pulumi:"dstPort"`
// Destination interface name from available interfaces. The structure of `dstintf` block is documented below.
Dstintfs []CentralsnatmapDstintf `pulumi:"dstintfs"`
// 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"`
// 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"`
// Enable/disable source NAT. Valid values: `disable`, `enable`.
Nat *string `pulumi:"nat"`
// Enable/disable NAT46. Valid values: `enable`, `disable`.
Nat46 *string `pulumi:"nat46"`
// Enable/disable NAT64. Valid values: `enable`, `disable`.
Nat64 *string `pulumi:"nat64"`
// IPv6 pools to be used for source NAT. The structure of `natIppool6` block is documented below.
NatIppool6s []CentralsnatmapNatIppool6 `pulumi:"natIppool6s"`
// Name of the IP pools to be used to translate addresses from available IP Pools. The structure of `natIppool` block is documented below.
NatIppools []CentralsnatmapNatIppool `pulumi:"natIppools"`
// Translated port or port range (0 to 65535, 0 means any port).
NatPort *string `pulumi:"natPort"`
// IPv6 Original address. The structure of `origAddr6` block is documented below.
OrigAddr6s []CentralsnatmapOrigAddr6 `pulumi:"origAddr6s"`
// Original address. The structure of `origAddr` block is documented below.
OrigAddrs []CentralsnatmapOrigAddr `pulumi:"origAddrs"`
// Original TCP port (1 to 65535, 0 means any port).
OrigPort *string `pulumi:"origPort"`
// Policy ID.
Policyid *int `pulumi:"policyid"`
// Integer value for the protocol type (0 - 255).
Protocol *int `pulumi:"protocol"`
// Source interface name from available interfaces. The structure of `srcintf` block is documented below.
Srcintfs []CentralsnatmapSrcintf `pulumi:"srcintfs"`
// Enable/disable the active status of this policy. Valid values: `enable`, `disable`.
Status *string `pulumi:"status"`
// IPv4/IPv6 source NAT. Valid values: `ipv4`, `ipv6`.
Type *string `pulumi:"type"`
// Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
Uuid *string `pulumi:"uuid"`
// 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"`
}
type CentralsnatmapState struct {
// Comment.
Comments pulumi.StringPtrInput
// IPv6 Destination address. The structure of `dstAddr6` block is documented below.
DstAddr6s CentralsnatmapDstAddr6ArrayInput
// Destination address name from available addresses. The structure of `dstAddr` block is documented below.
DstAddrs CentralsnatmapDstAddrArrayInput
// Destination port or port range (1 to 65535, 0 means any port).
DstPort pulumi.StringPtrInput
// Destination interface name from available interfaces. The structure of `dstintf` block is documented below.
Dstintfs CentralsnatmapDstintfArrayInput
// 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
// 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
// Enable/disable source NAT. Valid values: `disable`, `enable`.
Nat pulumi.StringPtrInput
// Enable/disable NAT46. Valid values: `enable`, `disable`.
Nat46 pulumi.StringPtrInput
// Enable/disable NAT64. Valid values: `enable`, `disable`.
Nat64 pulumi.StringPtrInput
// IPv6 pools to be used for source NAT. The structure of `natIppool6` block is documented below.
NatIppool6s CentralsnatmapNatIppool6ArrayInput
// Name of the IP pools to be used to translate addresses from available IP Pools. The structure of `natIppool` block is documented below.
NatIppools CentralsnatmapNatIppoolArrayInput
// Translated port or port range (0 to 65535, 0 means any port).
NatPort pulumi.StringPtrInput
// IPv6 Original address. The structure of `origAddr6` block is documented below.
OrigAddr6s CentralsnatmapOrigAddr6ArrayInput
// Original address. The structure of `origAddr` block is documented below.
OrigAddrs CentralsnatmapOrigAddrArrayInput
// Original TCP port (1 to 65535, 0 means any port).
OrigPort pulumi.StringPtrInput
// Policy ID.
Policyid pulumi.IntPtrInput
// Integer value for the protocol type (0 - 255).
Protocol pulumi.IntPtrInput
// Source interface name from available interfaces. The structure of `srcintf` block is documented below.
Srcintfs CentralsnatmapSrcintfArrayInput
// Enable/disable the active status of this policy. Valid values: `enable`, `disable`.
Status pulumi.StringPtrInput
// IPv4/IPv6 source NAT. Valid values: `ipv4`, `ipv6`.
Type pulumi.StringPtrInput
// Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
Uuid pulumi.StringPtrInput
// 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
}
func (CentralsnatmapState) ElementType() reflect.Type {
return reflect.TypeOf((*centralsnatmapState)(nil)).Elem()
}
type centralsnatmapArgs struct {
// Comment.
Comments *string `pulumi:"comments"`
// IPv6 Destination address. The structure of `dstAddr6` block is documented below.
DstAddr6s []CentralsnatmapDstAddr6 `pulumi:"dstAddr6s"`
// Destination address name from available addresses. The structure of `dstAddr` block is documented below.
DstAddrs []CentralsnatmapDstAddr `pulumi:"dstAddrs"`
// Destination port or port range (1 to 65535, 0 means any port).
DstPort *string `pulumi:"dstPort"`
// Destination interface name from available interfaces. The structure of `dstintf` block is documented below.
Dstintfs []CentralsnatmapDstintf `pulumi:"dstintfs"`
// 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"`
// 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"`
// Enable/disable source NAT. Valid values: `disable`, `enable`.
Nat string `pulumi:"nat"`
// Enable/disable NAT46. Valid values: `enable`, `disable`.
Nat46 *string `pulumi:"nat46"`
// Enable/disable NAT64. Valid values: `enable`, `disable`.
Nat64 *string `pulumi:"nat64"`
// IPv6 pools to be used for source NAT. The structure of `natIppool6` block is documented below.
NatIppool6s []CentralsnatmapNatIppool6 `pulumi:"natIppool6s"`
// Name of the IP pools to be used to translate addresses from available IP Pools. The structure of `natIppool` block is documented below.
NatIppools []CentralsnatmapNatIppool `pulumi:"natIppools"`
// Translated port or port range (0 to 65535, 0 means any port).
NatPort *string `pulumi:"natPort"`
// IPv6 Original address. The structure of `origAddr6` block is documented below.
OrigAddr6s []CentralsnatmapOrigAddr6 `pulumi:"origAddr6s"`
// Original address. The structure of `origAddr` block is documented below.
OrigAddrs []CentralsnatmapOrigAddr `pulumi:"origAddrs"`
// Original TCP port (1 to 65535, 0 means any port).
OrigPort string `pulumi:"origPort"`
// Policy ID.
Policyid *int `pulumi:"policyid"`
// Integer value for the protocol type (0 - 255).
Protocol int `pulumi:"protocol"`
// Source interface name from available interfaces. The structure of `srcintf` block is documented below.
Srcintfs []CentralsnatmapSrcintf `pulumi:"srcintfs"`
// Enable/disable the active status of this policy. Valid values: `enable`, `disable`.
Status *string `pulumi:"status"`
// IPv4/IPv6 source NAT. Valid values: `ipv4`, `ipv6`.
Type *string `pulumi:"type"`
// Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
Uuid *string `pulumi:"uuid"`
// 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"`
}
// The set of arguments for constructing a Centralsnatmap resource.
type CentralsnatmapArgs struct {
// Comment.
Comments pulumi.StringPtrInput
// IPv6 Destination address. The structure of `dstAddr6` block is documented below.
DstAddr6s CentralsnatmapDstAddr6ArrayInput
// Destination address name from available addresses. The structure of `dstAddr` block is documented below.
DstAddrs CentralsnatmapDstAddrArrayInput
// Destination port or port range (1 to 65535, 0 means any port).
DstPort pulumi.StringPtrInput
// Destination interface name from available interfaces. The structure of `dstintf` block is documented below.
Dstintfs CentralsnatmapDstintfArrayInput
// 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
// 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
// Enable/disable source NAT. Valid values: `disable`, `enable`.
Nat pulumi.StringInput
// Enable/disable NAT46. Valid values: `enable`, `disable`.
Nat46 pulumi.StringPtrInput
// Enable/disable NAT64. Valid values: `enable`, `disable`.
Nat64 pulumi.StringPtrInput
// IPv6 pools to be used for source NAT. The structure of `natIppool6` block is documented below.
NatIppool6s CentralsnatmapNatIppool6ArrayInput
// Name of the IP pools to be used to translate addresses from available IP Pools. The structure of `natIppool` block is documented below.
NatIppools CentralsnatmapNatIppoolArrayInput
// Translated port or port range (0 to 65535, 0 means any port).
NatPort pulumi.StringPtrInput
// IPv6 Original address. The structure of `origAddr6` block is documented below.
OrigAddr6s CentralsnatmapOrigAddr6ArrayInput
// Original address. The structure of `origAddr` block is documented below.
OrigAddrs CentralsnatmapOrigAddrArrayInput
// Original TCP port (1 to 65535, 0 means any port).
OrigPort pulumi.StringInput
// Policy ID.
Policyid pulumi.IntPtrInput
// Integer value for the protocol type (0 - 255).
Protocol pulumi.IntInput
// Source interface name from available interfaces. The structure of `srcintf` block is documented below.
Srcintfs CentralsnatmapSrcintfArrayInput
// Enable/disable the active status of this policy. Valid values: `enable`, `disable`.
Status pulumi.StringPtrInput
// IPv4/IPv6 source NAT. Valid values: `ipv4`, `ipv6`.
Type pulumi.StringPtrInput
// Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
Uuid pulumi.StringPtrInput
// 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
}
func (CentralsnatmapArgs) ElementType() reflect.Type {
return reflect.TypeOf((*centralsnatmapArgs)(nil)).Elem()
}
type CentralsnatmapInput interface {
pulumi.Input
ToCentralsnatmapOutput() CentralsnatmapOutput
ToCentralsnatmapOutputWithContext(ctx context.Context) CentralsnatmapOutput
}
func (*Centralsnatmap) ElementType() reflect.Type {
return reflect.TypeOf((**Centralsnatmap)(nil)).Elem()
}
func (i *Centralsnatmap) ToCentralsnatmapOutput() CentralsnatmapOutput {
return i.ToCentralsnatmapOutputWithContext(context.Background())
}
func (i *Centralsnatmap) ToCentralsnatmapOutputWithContext(ctx context.Context) CentralsnatmapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CentralsnatmapOutput)
}
// CentralsnatmapArrayInput is an input type that accepts CentralsnatmapArray and CentralsnatmapArrayOutput values.
// You can construct a concrete instance of `CentralsnatmapArrayInput` via:
//
// CentralsnatmapArray{ CentralsnatmapArgs{...} }
type CentralsnatmapArrayInput interface {
pulumi.Input
ToCentralsnatmapArrayOutput() CentralsnatmapArrayOutput
ToCentralsnatmapArrayOutputWithContext(context.Context) CentralsnatmapArrayOutput
}
type CentralsnatmapArray []CentralsnatmapInput
func (CentralsnatmapArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Centralsnatmap)(nil)).Elem()
}
func (i CentralsnatmapArray) ToCentralsnatmapArrayOutput() CentralsnatmapArrayOutput {
return i.ToCentralsnatmapArrayOutputWithContext(context.Background())
}
func (i CentralsnatmapArray) ToCentralsnatmapArrayOutputWithContext(ctx context.Context) CentralsnatmapArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CentralsnatmapArrayOutput)
}
// CentralsnatmapMapInput is an input type that accepts CentralsnatmapMap and CentralsnatmapMapOutput values.
// You can construct a concrete instance of `CentralsnatmapMapInput` via:
//
// CentralsnatmapMap{ "key": CentralsnatmapArgs{...} }
type CentralsnatmapMapInput interface {
pulumi.Input
ToCentralsnatmapMapOutput() CentralsnatmapMapOutput
ToCentralsnatmapMapOutputWithContext(context.Context) CentralsnatmapMapOutput
}
type CentralsnatmapMap map[string]CentralsnatmapInput
func (CentralsnatmapMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Centralsnatmap)(nil)).Elem()
}
func (i CentralsnatmapMap) ToCentralsnatmapMapOutput() CentralsnatmapMapOutput {
return i.ToCentralsnatmapMapOutputWithContext(context.Background())
}
func (i CentralsnatmapMap) ToCentralsnatmapMapOutputWithContext(ctx context.Context) CentralsnatmapMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CentralsnatmapMapOutput)
}
type CentralsnatmapOutput struct{ *pulumi.OutputState }
func (CentralsnatmapOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Centralsnatmap)(nil)).Elem()
}
func (o CentralsnatmapOutput) ToCentralsnatmapOutput() CentralsnatmapOutput {
return o
}
func (o CentralsnatmapOutput) ToCentralsnatmapOutputWithContext(ctx context.Context) CentralsnatmapOutput {
return o
}
// Comment.
func (o CentralsnatmapOutput) Comments() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringPtrOutput { return v.Comments }).(pulumi.StringPtrOutput)
}
// IPv6 Destination address. The structure of `dstAddr6` block is documented below.
func (o CentralsnatmapOutput) DstAddr6s() CentralsnatmapDstAddr6ArrayOutput {
return o.ApplyT(func(v *Centralsnatmap) CentralsnatmapDstAddr6ArrayOutput { return v.DstAddr6s }).(CentralsnatmapDstAddr6ArrayOutput)
}
// Destination address name from available addresses. The structure of `dstAddr` block is documented below.
func (o CentralsnatmapOutput) DstAddrs() CentralsnatmapDstAddrArrayOutput {
return o.ApplyT(func(v *Centralsnatmap) CentralsnatmapDstAddrArrayOutput { return v.DstAddrs }).(CentralsnatmapDstAddrArrayOutput)
}
// Destination port or port range (1 to 65535, 0 means any port).
func (o CentralsnatmapOutput) DstPort() pulumi.StringOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringOutput { return v.DstPort }).(pulumi.StringOutput)
}
// Destination interface name from available interfaces. The structure of `dstintf` block is documented below.
func (o CentralsnatmapOutput) Dstintfs() CentralsnatmapDstintfArrayOutput {
return o.ApplyT(func(v *Centralsnatmap) CentralsnatmapDstintfArrayOutput { return v.Dstintfs }).(CentralsnatmapDstintfArrayOutput)
}
// 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 CentralsnatmapOutput) DynamicSortSubtable() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringPtrOutput { return v.DynamicSortSubtable }).(pulumi.StringPtrOutput)
}
// 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 CentralsnatmapOutput) GetAllTables() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringPtrOutput { return v.GetAllTables }).(pulumi.StringPtrOutput)
}
// Enable/disable source NAT. Valid values: `disable`, `enable`.
func (o CentralsnatmapOutput) Nat() pulumi.StringOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringOutput { return v.Nat }).(pulumi.StringOutput)
}
// Enable/disable NAT46. Valid values: `enable`, `disable`.
func (o CentralsnatmapOutput) Nat46() pulumi.StringOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringOutput { return v.Nat46 }).(pulumi.StringOutput)
}
// Enable/disable NAT64. Valid values: `enable`, `disable`.
func (o CentralsnatmapOutput) Nat64() pulumi.StringOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringOutput { return v.Nat64 }).(pulumi.StringOutput)
}
// IPv6 pools to be used for source NAT. The structure of `natIppool6` block is documented below.
func (o CentralsnatmapOutput) NatIppool6s() CentralsnatmapNatIppool6ArrayOutput {
return o.ApplyT(func(v *Centralsnatmap) CentralsnatmapNatIppool6ArrayOutput { return v.NatIppool6s }).(CentralsnatmapNatIppool6ArrayOutput)
}
// Name of the IP pools to be used to translate addresses from available IP Pools. The structure of `natIppool` block is documented below.
func (o CentralsnatmapOutput) NatIppools() CentralsnatmapNatIppoolArrayOutput {
return o.ApplyT(func(v *Centralsnatmap) CentralsnatmapNatIppoolArrayOutput { return v.NatIppools }).(CentralsnatmapNatIppoolArrayOutput)
}
// Translated port or port range (0 to 65535, 0 means any port).
func (o CentralsnatmapOutput) NatPort() pulumi.StringOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringOutput { return v.NatPort }).(pulumi.StringOutput)
}
// IPv6 Original address. The structure of `origAddr6` block is documented below.
func (o CentralsnatmapOutput) OrigAddr6s() CentralsnatmapOrigAddr6ArrayOutput {
return o.ApplyT(func(v *Centralsnatmap) CentralsnatmapOrigAddr6ArrayOutput { return v.OrigAddr6s }).(CentralsnatmapOrigAddr6ArrayOutput)
}
// Original address. The structure of `origAddr` block is documented below.
func (o CentralsnatmapOutput) OrigAddrs() CentralsnatmapOrigAddrArrayOutput {
return o.ApplyT(func(v *Centralsnatmap) CentralsnatmapOrigAddrArrayOutput { return v.OrigAddrs }).(CentralsnatmapOrigAddrArrayOutput)
}
// Original TCP port (1 to 65535, 0 means any port).
func (o CentralsnatmapOutput) OrigPort() pulumi.StringOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringOutput { return v.OrigPort }).(pulumi.StringOutput)
}
// Policy ID.
func (o CentralsnatmapOutput) Policyid() pulumi.IntOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.IntOutput { return v.Policyid }).(pulumi.IntOutput)
}
// Integer value for the protocol type (0 - 255).
func (o CentralsnatmapOutput) Protocol() pulumi.IntOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.IntOutput { return v.Protocol }).(pulumi.IntOutput)
}
// Source interface name from available interfaces. The structure of `srcintf` block is documented below.
func (o CentralsnatmapOutput) Srcintfs() CentralsnatmapSrcintfArrayOutput {
return o.ApplyT(func(v *Centralsnatmap) CentralsnatmapSrcintfArrayOutput { return v.Srcintfs }).(CentralsnatmapSrcintfArrayOutput)
}
// Enable/disable the active status of this policy. Valid values: `enable`, `disable`.
func (o CentralsnatmapOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// IPv4/IPv6 source NAT. Valid values: `ipv4`, `ipv6`.
func (o CentralsnatmapOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// Universally Unique Identifier (UUID; automatically assigned but can be manually reset).
func (o CentralsnatmapOutput) Uuid() pulumi.StringOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringOutput { return v.Uuid }).(pulumi.StringOutput)
}
// 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 CentralsnatmapOutput) Vdomparam() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Centralsnatmap) pulumi.StringPtrOutput { return v.Vdomparam }).(pulumi.StringPtrOutput)
}
type CentralsnatmapArrayOutput struct{ *pulumi.OutputState }
func (CentralsnatmapArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Centralsnatmap)(nil)).Elem()
}
func (o CentralsnatmapArrayOutput) ToCentralsnatmapArrayOutput() CentralsnatmapArrayOutput {
return o
}
func (o CentralsnatmapArrayOutput) ToCentralsnatmapArrayOutputWithContext(ctx context.Context) CentralsnatmapArrayOutput {
return o
}
func (o CentralsnatmapArrayOutput) Index(i pulumi.IntInput) CentralsnatmapOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Centralsnatmap {
return vs[0].([]*Centralsnatmap)[vs[1].(int)]
}).(CentralsnatmapOutput)
}
type CentralsnatmapMapOutput struct{ *pulumi.OutputState }
func (CentralsnatmapMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Centralsnatmap)(nil)).Elem()
}
func (o CentralsnatmapMapOutput) ToCentralsnatmapMapOutput() CentralsnatmapMapOutput {
return o
}
func (o CentralsnatmapMapOutput) ToCentralsnatmapMapOutputWithContext(ctx context.Context) CentralsnatmapMapOutput {
return o
}
func (o CentralsnatmapMapOutput) MapIndex(k pulumi.StringInput) CentralsnatmapOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Centralsnatmap {
return vs[0].(map[string]*Centralsnatmap)[vs[1].(string)]
}).(CentralsnatmapOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CentralsnatmapInput)(nil)).Elem(), &Centralsnatmap{})
pulumi.RegisterInputType(reflect.TypeOf((*CentralsnatmapArrayInput)(nil)).Elem(), CentralsnatmapArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CentralsnatmapMapInput)(nil)).Elem(), CentralsnatmapMap{})
pulumi.RegisterOutputType(CentralsnatmapOutput{})
pulumi.RegisterOutputType(CentralsnatmapArrayOutput{})
pulumi.RegisterOutputType(CentralsnatmapMapOutput{})
}