/
endpoint.go
683 lines (625 loc) · 28.7 KB
/
endpoint.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
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
// 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 privatelink
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Private Endpoint.
//
// Azure Private Endpoint is a network interface that connects you privately and securely to a service powered by Azure Private Link. Private Endpoint uses a private IP address from your VNet, effectively bringing the service into your VNet. The service could be an Azure service such as Azure Storage, SQL, etc. or your own Private Link Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/lb"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatedns"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatelink"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-network"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// service, err := network.NewSubnet(ctx, "service", &network.SubnetArgs{
// Name: pulumi.String("service"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// EnforcePrivateLinkServiceNetworkPolicies: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// endpoint, err := network.NewSubnet(ctx, "endpoint", &network.SubnetArgs{
// Name: pulumi.String("endpoint"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// EnforcePrivateLinkEndpointNetworkPolicies: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example-pip"),
// Sku: pulumi.String("Standard"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// })
// if err != nil {
// return err
// }
// exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{
// Name: pulumi.String("example-lb"),
// Sku: pulumi.String("Standard"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
// &lb.LoadBalancerFrontendIpConfigurationArgs{
// Name: examplePublicIp.Name,
// PublicIpAddressId: examplePublicIp.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleLinkService, err := privatedns.NewLinkService(ctx, "example", &privatedns.LinkServiceArgs{
// Name: pulumi.String("example-privatelink"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// NatIpConfigurations: privatedns.LinkServiceNatIpConfigurationArray{
// &privatedns.LinkServiceNatIpConfigurationArgs{
// Name: examplePublicIp.Name,
// Primary: pulumi.Bool(true),
// SubnetId: service.ID(),
// },
// },
// LoadBalancerFrontendIpConfigurationIds: pulumi.StringArray{
// exampleLoadBalancer.FrontendIpConfigurations.ApplyT(func(frontendIpConfigurations []lb.LoadBalancerFrontendIpConfiguration) (*string, error) {
// return &frontendIpConfigurations[0].Id, nil
// }).(pulumi.StringPtrOutput),
// },
// })
// if err != nil {
// return err
// }
// _, err = privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
// Name: pulumi.String("example-endpoint"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SubnetId: endpoint.ID(),
// PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
// Name: pulumi.String("example-privateserviceconnection"),
// PrivateConnectionResourceId: exampleLinkService.ID(),
// IsManualConnection: pulumi.Bool(false),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// Using a Private Link Service Alias with existing resources:
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatelink"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{
// Name: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// vnet, err := network.LookupVirtualNetwork(ctx, &network.LookupVirtualNetworkArgs{
// Name: "example-network",
// ResourceGroupName: example.Name,
// }, nil)
// if err != nil {
// return err
// }
// subnet, err := network.LookupSubnet(ctx, &network.LookupSubnetArgs{
// Name: "default",
// VirtualNetworkName: vnet.Name,
// ResourceGroupName: example.Name,
// }, nil)
// if err != nil {
// return err
// }
// _, err = privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
// Name: pulumi.String("example-endpoint"),
// Location: pulumi.String(example.Location),
// ResourceGroupName: pulumi.String(example.Name),
// SubnetId: pulumi.String(subnet.Id),
// PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
// Name: pulumi.String("example-privateserviceconnection"),
// PrivateConnectionResourceAlias: pulumi.String("example-privatelinkservice.d20286c8-4ea5-11eb-9584-8f53157226c6.centralus.azure.privatelinkservice"),
// IsManualConnection: pulumi.Bool(true),
// RequestMessage: pulumi.String("PL"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// Using a Private Endpoint pointing to an *owned* Azure service, with proper DNS configuration:
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatedns"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatelink"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("exampleaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("virtnetname"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("subnetname"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
// Name: pulumi.String("privatelink.blob.core.windows.net"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
// Name: pulumi.String("example-endpoint"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SubnetId: exampleSubnet.ID(),
// PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
// Name: pulumi.String("example-privateserviceconnection"),
// PrivateConnectionResourceId: exampleAccount.ID(),
// SubresourceNames: pulumi.StringArray{
// pulumi.String("blob"),
// },
// IsManualConnection: pulumi.Bool(false),
// },
// PrivateDnsZoneGroup: &privatelink.EndpointPrivateDnsZoneGroupArgs{
// Name: pulumi.String("example-dns-zone-group"),
// PrivateDnsZoneIds: pulumi.StringArray{
// exampleZone.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = privatedns.NewZoneVirtualNetworkLink(ctx, "example", &privatedns.ZoneVirtualNetworkLinkArgs{
// Name: pulumi.String("example-link"),
// ResourceGroupName: example.Name,
// PrivateDnsZoneName: exampleZone.Name,
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Example HCL Configurations
//
// * How to conneca `Private Endpoint` to a Application Gateway
// * How to connect a `Private Endpoint` to a Cosmos MongoDB
// * How to connect a `Private Endpoint` to a Cosmos PostgreSQL
// * How to connect a `Private Endpoint` to a PostgreSQL Server
// * How to connect a `Private Endpoint` to a Private Link Service
// * How to connect a `Private Endpoint` to a Private DNS Group
// * How to connect a `Private Endpoint` to a Databricks Workspace
//
// ## Import
//
// Private Endpoints can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:privatelink/endpoint:Endpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/privateEndpoints/endpoint1
// ```
type Endpoint struct {
pulumi.CustomResourceState
// A `customDnsConfigs` block as defined below.
CustomDnsConfigs EndpointCustomDnsConfigArrayOutput `pulumi:"customDnsConfigs"`
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName pulumi.StringPtrOutput `pulumi:"customNetworkInterfaceName"`
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations EndpointIpConfigurationArrayOutput `pulumi:"ipConfigurations"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkInterface` block as defined below.
NetworkInterfaces EndpointNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"`
// A `privateDnsZoneConfigs` block as defined below.
PrivateDnsZoneConfigs EndpointPrivateDnsZoneConfigArrayOutput `pulumi:"privateDnsZoneConfigs"`
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup EndpointPrivateDnsZoneGroupPtrOutput `pulumi:"privateDnsZoneGroup"`
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection EndpointPrivateServiceConnectionOutput `pulumi:"privateServiceConnection"`
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewEndpoint registers a new resource with the given unique name, arguments, and options.
func NewEndpoint(ctx *pulumi.Context,
name string, args *EndpointArgs, opts ...pulumi.ResourceOption) (*Endpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PrivateServiceConnection == nil {
return nil, errors.New("invalid value for required argument 'PrivateServiceConnection'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SubnetId == nil {
return nil, errors.New("invalid value for required argument 'SubnetId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Endpoint
err := ctx.RegisterResource("azure:privatelink/endpoint:Endpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEndpoint gets an existing Endpoint 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 GetEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EndpointState, opts ...pulumi.ResourceOption) (*Endpoint, error) {
var resource Endpoint
err := ctx.ReadResource("azure:privatelink/endpoint:Endpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Endpoint resources.
type endpointState struct {
// A `customDnsConfigs` block as defined below.
CustomDnsConfigs []EndpointCustomDnsConfig `pulumi:"customDnsConfigs"`
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName *string `pulumi:"customNetworkInterfaceName"`
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations []EndpointIpConfiguration `pulumi:"ipConfigurations"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkInterface` block as defined below.
NetworkInterfaces []EndpointNetworkInterface `pulumi:"networkInterfaces"`
// A `privateDnsZoneConfigs` block as defined below.
PrivateDnsZoneConfigs []EndpointPrivateDnsZoneConfig `pulumi:"privateDnsZoneConfigs"`
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup *EndpointPrivateDnsZoneGroup `pulumi:"privateDnsZoneGroup"`
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection *EndpointPrivateServiceConnection `pulumi:"privateServiceConnection"`
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type EndpointState struct {
// A `customDnsConfigs` block as defined below.
CustomDnsConfigs EndpointCustomDnsConfigArrayInput
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName pulumi.StringPtrInput
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations EndpointIpConfigurationArrayInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkInterface` block as defined below.
NetworkInterfaces EndpointNetworkInterfaceArrayInput
// A `privateDnsZoneConfigs` block as defined below.
PrivateDnsZoneConfigs EndpointPrivateDnsZoneConfigArrayInput
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup EndpointPrivateDnsZoneGroupPtrInput
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection EndpointPrivateServiceConnectionPtrInput
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (EndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*endpointState)(nil)).Elem()
}
type endpointArgs struct {
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName *string `pulumi:"customNetworkInterfaceName"`
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations []EndpointIpConfiguration `pulumi:"ipConfigurations"`
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup *EndpointPrivateDnsZoneGroup `pulumi:"privateDnsZoneGroup"`
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection EndpointPrivateServiceConnection `pulumi:"privateServiceConnection"`
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId string `pulumi:"subnetId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Endpoint resource.
type EndpointArgs struct {
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
CustomNetworkInterfaceName pulumi.StringPtrInput
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
IpConfigurations EndpointIpConfigurationArrayInput
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `privateDnsZoneGroup` block as defined below.
PrivateDnsZoneGroup EndpointPrivateDnsZoneGroupPtrInput
// A `privateServiceConnection` block as defined below.
PrivateServiceConnection EndpointPrivateServiceConnectionInput
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
SubnetId pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (EndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*endpointArgs)(nil)).Elem()
}
type EndpointInput interface {
pulumi.Input
ToEndpointOutput() EndpointOutput
ToEndpointOutputWithContext(ctx context.Context) EndpointOutput
}
func (*Endpoint) ElementType() reflect.Type {
return reflect.TypeOf((**Endpoint)(nil)).Elem()
}
func (i *Endpoint) ToEndpointOutput() EndpointOutput {
return i.ToEndpointOutputWithContext(context.Background())
}
func (i *Endpoint) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointOutput)
}
// EndpointArrayInput is an input type that accepts EndpointArray and EndpointArrayOutput values.
// You can construct a concrete instance of `EndpointArrayInput` via:
//
// EndpointArray{ EndpointArgs{...} }
type EndpointArrayInput interface {
pulumi.Input
ToEndpointArrayOutput() EndpointArrayOutput
ToEndpointArrayOutputWithContext(context.Context) EndpointArrayOutput
}
type EndpointArray []EndpointInput
func (EndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Endpoint)(nil)).Elem()
}
func (i EndpointArray) ToEndpointArrayOutput() EndpointArrayOutput {
return i.ToEndpointArrayOutputWithContext(context.Background())
}
func (i EndpointArray) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointArrayOutput)
}
// EndpointMapInput is an input type that accepts EndpointMap and EndpointMapOutput values.
// You can construct a concrete instance of `EndpointMapInput` via:
//
// EndpointMap{ "key": EndpointArgs{...} }
type EndpointMapInput interface {
pulumi.Input
ToEndpointMapOutput() EndpointMapOutput
ToEndpointMapOutputWithContext(context.Context) EndpointMapOutput
}
type EndpointMap map[string]EndpointInput
func (EndpointMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Endpoint)(nil)).Elem()
}
func (i EndpointMap) ToEndpointMapOutput() EndpointMapOutput {
return i.ToEndpointMapOutputWithContext(context.Background())
}
func (i EndpointMap) ToEndpointMapOutputWithContext(ctx context.Context) EndpointMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointMapOutput)
}
type EndpointOutput struct{ *pulumi.OutputState }
func (EndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Endpoint)(nil)).Elem()
}
func (o EndpointOutput) ToEndpointOutput() EndpointOutput {
return o
}
func (o EndpointOutput) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput {
return o
}
// A `customDnsConfigs` block as defined below.
func (o EndpointOutput) CustomDnsConfigs() EndpointCustomDnsConfigArrayOutput {
return o.ApplyT(func(v *Endpoint) EndpointCustomDnsConfigArrayOutput { return v.CustomDnsConfigs }).(EndpointCustomDnsConfigArrayOutput)
}
// The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
func (o EndpointOutput) CustomNetworkInterfaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringPtrOutput { return v.CustomNetworkInterfaceName }).(pulumi.StringPtrOutput)
}
// One or more `ipConfiguration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
func (o EndpointOutput) IpConfigurations() EndpointIpConfigurationArrayOutput {
return o.ApplyT(func(v *Endpoint) EndpointIpConfigurationArrayOutput { return v.IpConfigurations }).(EndpointIpConfigurationArrayOutput)
}
// The supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o EndpointOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
func (o EndpointOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkInterface` block as defined below.
func (o EndpointOutput) NetworkInterfaces() EndpointNetworkInterfaceArrayOutput {
return o.ApplyT(func(v *Endpoint) EndpointNetworkInterfaceArrayOutput { return v.NetworkInterfaces }).(EndpointNetworkInterfaceArrayOutput)
}
// A `privateDnsZoneConfigs` block as defined below.
func (o EndpointOutput) PrivateDnsZoneConfigs() EndpointPrivateDnsZoneConfigArrayOutput {
return o.ApplyT(func(v *Endpoint) EndpointPrivateDnsZoneConfigArrayOutput { return v.PrivateDnsZoneConfigs }).(EndpointPrivateDnsZoneConfigArrayOutput)
}
// A `privateDnsZoneGroup` block as defined below.
func (o EndpointOutput) PrivateDnsZoneGroup() EndpointPrivateDnsZoneGroupPtrOutput {
return o.ApplyT(func(v *Endpoint) EndpointPrivateDnsZoneGroupPtrOutput { return v.PrivateDnsZoneGroup }).(EndpointPrivateDnsZoneGroupPtrOutput)
}
// A `privateServiceConnection` block as defined below.
func (o EndpointOutput) PrivateServiceConnection() EndpointPrivateServiceConnectionOutput {
return o.ApplyT(func(v *Endpoint) EndpointPrivateServiceConnectionOutput { return v.PrivateServiceConnection }).(EndpointPrivateServiceConnectionOutput)
}
// Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
func (o EndpointOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
func (o EndpointOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o EndpointOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Endpoint) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type EndpointArrayOutput struct{ *pulumi.OutputState }
func (EndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Endpoint)(nil)).Elem()
}
func (o EndpointArrayOutput) ToEndpointArrayOutput() EndpointArrayOutput {
return o
}
func (o EndpointArrayOutput) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput {
return o
}
func (o EndpointArrayOutput) Index(i pulumi.IntInput) EndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Endpoint {
return vs[0].([]*Endpoint)[vs[1].(int)]
}).(EndpointOutput)
}
type EndpointMapOutput struct{ *pulumi.OutputState }
func (EndpointMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Endpoint)(nil)).Elem()
}
func (o EndpointMapOutput) ToEndpointMapOutput() EndpointMapOutput {
return o
}
func (o EndpointMapOutput) ToEndpointMapOutputWithContext(ctx context.Context) EndpointMapOutput {
return o
}
func (o EndpointMapOutput) MapIndex(k pulumi.StringInput) EndpointOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Endpoint {
return vs[0].(map[string]*Endpoint)[vs[1].(string)]
}).(EndpointOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EndpointInput)(nil)).Elem(), &Endpoint{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointArrayInput)(nil)).Elem(), EndpointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointMapInput)(nil)).Elem(), EndpointMap{})
pulumi.RegisterOutputType(EndpointOutput{})
pulumi.RegisterOutputType(EndpointArrayOutput{})
pulumi.RegisterOutputType(EndpointMapOutput{})
}