/
managedZone.go
737 lines (676 loc) · 27.5 KB
/
managedZone.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
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package dns
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// A zone is a subtree of the DNS namespace under one administrative
// responsibility. A ManagedZone is a resource that represents a DNS zone
// hosted by the Cloud DNS service.
//
// To get more information about ManagedZone, see:
//
// * [API documentation](https://cloud.google.com/dns/api/v1/managedZones)
// * How-to Guides
// * [Managing Zones](https://cloud.google.com/dns/zones/)
//
// ## Example Usage
// ### Dns Managed Zone Basic
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/dns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := dns.NewManagedZone(ctx, "example_zone", &dns.ManagedZoneArgs{
// Description: pulumi.String("Example DNS zone"),
// DnsName: pulumi.String("my-domain.com."),
// Labels: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Dns Managed Zone Private
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/compute"
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/dns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := compute.NewNetwork(ctx, "network_1", &compute.NetworkArgs{
// AutoCreateSubnetworks: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = compute.NewNetwork(ctx, "network_2", &compute.NetworkArgs{
// AutoCreateSubnetworks: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = dns.NewManagedZone(ctx, "private_zone", &dns.ManagedZoneArgs{
// DnsName: pulumi.String("private.example.com."),
// Description: pulumi.String("Example private DNS zone"),
// Labels: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// Visibility: pulumi.String("private"),
// PrivateVisibilityConfig: &dns.ManagedZonePrivateVisibilityConfigArgs{
// Networks: dns.ManagedZonePrivateVisibilityConfigNetworkArray{
// &dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
// NetworkUrl: network_1.ID(),
// },
// &dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
// NetworkUrl: network_2.ID(),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Dns Managed Zone Private Forwarding
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/compute"
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/dns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := compute.NewNetwork(ctx, "network_1", &compute.NetworkArgs{
// AutoCreateSubnetworks: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = compute.NewNetwork(ctx, "network_2", &compute.NetworkArgs{
// AutoCreateSubnetworks: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = dns.NewManagedZone(ctx, "private_zone", &dns.ManagedZoneArgs{
// DnsName: pulumi.String("private.example.com."),
// Description: pulumi.String("Example private DNS zone"),
// Labels: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// Visibility: pulumi.String("private"),
// PrivateVisibilityConfig: &dns.ManagedZonePrivateVisibilityConfigArgs{
// Networks: dns.ManagedZonePrivateVisibilityConfigNetworkArray{
// &dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
// NetworkUrl: network_1.ID(),
// },
// &dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
// NetworkUrl: network_2.ID(),
// },
// },
// },
// ForwardingConfig: &dns.ManagedZoneForwardingConfigArgs{
// TargetNameServers: dns.ManagedZoneForwardingConfigTargetNameServerArray{
// &dns.ManagedZoneForwardingConfigTargetNameServerArgs{
// Ipv4Address: pulumi.String("172.16.1.10"),
// },
// &dns.ManagedZoneForwardingConfigTargetNameServerArgs{
// Ipv4Address: pulumi.String("172.16.1.20"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Dns Managed Zone Private Peering
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/compute"
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/dns"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := compute.NewNetwork(ctx, "network_source", &compute.NetworkArgs{
// AutoCreateSubnetworks: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = compute.NewNetwork(ctx, "network_target", &compute.NetworkArgs{
// AutoCreateSubnetworks: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = dns.NewManagedZone(ctx, "peering_zone", &dns.ManagedZoneArgs{
// DnsName: pulumi.String("peering.example.com."),
// Description: pulumi.String("Example private DNS peering zone"),
// Visibility: pulumi.String("private"),
// PrivateVisibilityConfig: &dns.ManagedZonePrivateVisibilityConfigArgs{
// Networks: dns.ManagedZonePrivateVisibilityConfigNetworkArray{
// &dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
// NetworkUrl: network_source.ID(),
// },
// },
// },
// PeeringConfig: &dns.ManagedZonePeeringConfigArgs{
// TargetNetwork: &dns.ManagedZonePeeringConfigTargetNetworkArgs{
// NetworkUrl: network_target.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Dns Managed Zone Service Directory
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/compute"
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/dns"
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/servicedirectory"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := servicedirectory.NewNamespace(ctx, "example", &servicedirectory.NamespaceArgs{
// NamespaceId: pulumi.String("example"),
// Location: pulumi.String("us-central1"),
// }, pulumi.Provider(google_beta))
// if err != nil {
// return err
// }
// _, err = dns.NewManagedZone(ctx, "sd_zone", &dns.ManagedZoneArgs{
// DnsName: pulumi.String("services.example.com."),
// Description: pulumi.String("Example private DNS Service Directory zone"),
// Visibility: pulumi.String("private"),
// ServiceDirectoryConfig: &dns.ManagedZoneServiceDirectoryConfigArgs{
// Namespace: &dns.ManagedZoneServiceDirectoryConfigNamespaceArgs{
// NamespaceUrl: example.ID(),
// },
// },
// }, pulumi.Provider(google_beta))
// if err != nil {
// return err
// }
// _, err = compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
// AutoCreateSubnetworks: pulumi.Bool(false),
// }, pulumi.Provider(google_beta))
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// ManagedZone can be imported using any of these accepted formats
//
// ```sh
// $ pulumi import gcp:dns/managedZone:ManagedZone default projects/{{project}}/managedZones/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:dns/managedZone:ManagedZone default {{project}}/{{name}}
// ```
//
// ```sh
// $ pulumi import gcp:dns/managedZone:ManagedZone default {{name}}
// ```
type ManagedZone struct {
pulumi.CustomResourceState
// A textual description field. Defaults to 'Managed by Pulumi'.
Description pulumi.StringOutput `pulumi:"description"`
// The DNS name of this managed zone, for instance "example.com.".
DnsName pulumi.StringOutput `pulumi:"dnsName"`
// DNSSEC configuration
// Structure is documented below.
DnssecConfig ManagedZoneDnssecConfigPtrOutput `pulumi:"dnssecConfig"`
// Set this true to delete all records in the zone.
ForceDestroy pulumi.BoolPtrOutput `pulumi:"forceDestroy"`
// The presence for this field indicates that outbound forwarding is enabled
// for this zone. The value of this field contains the set of destinations
// to forward to.
// Structure is documented below.
ForwardingConfig ManagedZoneForwardingConfigPtrOutput `pulumi:"forwardingConfig"`
// A set of key/value label pairs to assign to this ManagedZone.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// User assigned name for this resource.
// Must be unique within the project.
Name pulumi.StringOutput `pulumi:"name"`
// Delegate your managed_zone to these virtual name servers; defined by the server
NameServers pulumi.StringArrayOutput `pulumi:"nameServers"`
// The presence of this field indicates that DNS Peering is enabled for this
// zone. The value of this field contains the network to peer with.
// Structure is documented below.
PeeringConfig ManagedZonePeeringConfigPtrOutput `pulumi:"peeringConfig"`
// For privately visible zones, the set of Virtual Private Cloud
// resources that the zone is visible from.
// Structure is documented below.
PrivateVisibilityConfig ManagedZonePrivateVisibilityConfigPtrOutput `pulumi:"privateVisibilityConfig"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse
// lookup queries using automatically configured records for VPC resources. This only applies
// to networks listed under `privateVisibilityConfig`.
ReverseLookup pulumi.BoolPtrOutput `pulumi:"reverseLookup"`
// The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone.
// Structure is documented below.
ServiceDirectoryConfig ManagedZoneServiceDirectoryConfigPtrOutput `pulumi:"serviceDirectoryConfig"`
// The zone's visibility: public zones are exposed to the Internet,
// while private zones are visible only to Virtual Private Cloud resources.
// Default value is `public`.
// Possible values are `private` and `public`.
Visibility pulumi.StringPtrOutput `pulumi:"visibility"`
}
// NewManagedZone registers a new resource with the given unique name, arguments, and options.
func NewManagedZone(ctx *pulumi.Context,
name string, args *ManagedZoneArgs, opts ...pulumi.ResourceOption) (*ManagedZone, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DnsName == nil {
return nil, errors.New("invalid value for required argument 'DnsName'")
}
if args.Description == nil {
args.Description = pulumi.StringPtr("Managed by Pulumi")
}
var resource ManagedZone
err := ctx.RegisterResource("gcp:dns/managedZone:ManagedZone", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagedZone gets an existing ManagedZone 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 GetManagedZone(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagedZoneState, opts ...pulumi.ResourceOption) (*ManagedZone, error) {
var resource ManagedZone
err := ctx.ReadResource("gcp:dns/managedZone:ManagedZone", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagedZone resources.
type managedZoneState struct {
// A textual description field. Defaults to 'Managed by Pulumi'.
Description *string `pulumi:"description"`
// The DNS name of this managed zone, for instance "example.com.".
DnsName *string `pulumi:"dnsName"`
// DNSSEC configuration
// Structure is documented below.
DnssecConfig *ManagedZoneDnssecConfig `pulumi:"dnssecConfig"`
// Set this true to delete all records in the zone.
ForceDestroy *bool `pulumi:"forceDestroy"`
// The presence for this field indicates that outbound forwarding is enabled
// for this zone. The value of this field contains the set of destinations
// to forward to.
// Structure is documented below.
ForwardingConfig *ManagedZoneForwardingConfig `pulumi:"forwardingConfig"`
// A set of key/value label pairs to assign to this ManagedZone.
Labels map[string]string `pulumi:"labels"`
// User assigned name for this resource.
// Must be unique within the project.
Name *string `pulumi:"name"`
// Delegate your managed_zone to these virtual name servers; defined by the server
NameServers []string `pulumi:"nameServers"`
// The presence of this field indicates that DNS Peering is enabled for this
// zone. The value of this field contains the network to peer with.
// Structure is documented below.
PeeringConfig *ManagedZonePeeringConfig `pulumi:"peeringConfig"`
// For privately visible zones, the set of Virtual Private Cloud
// resources that the zone is visible from.
// Structure is documented below.
PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `pulumi:"privateVisibilityConfig"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse
// lookup queries using automatically configured records for VPC resources. This only applies
// to networks listed under `privateVisibilityConfig`.
ReverseLookup *bool `pulumi:"reverseLookup"`
// The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone.
// Structure is documented below.
ServiceDirectoryConfig *ManagedZoneServiceDirectoryConfig `pulumi:"serviceDirectoryConfig"`
// The zone's visibility: public zones are exposed to the Internet,
// while private zones are visible only to Virtual Private Cloud resources.
// Default value is `public`.
// Possible values are `private` and `public`.
Visibility *string `pulumi:"visibility"`
}
type ManagedZoneState struct {
// A textual description field. Defaults to 'Managed by Pulumi'.
Description pulumi.StringPtrInput
// The DNS name of this managed zone, for instance "example.com.".
DnsName pulumi.StringPtrInput
// DNSSEC configuration
// Structure is documented below.
DnssecConfig ManagedZoneDnssecConfigPtrInput
// Set this true to delete all records in the zone.
ForceDestroy pulumi.BoolPtrInput
// The presence for this field indicates that outbound forwarding is enabled
// for this zone. The value of this field contains the set of destinations
// to forward to.
// Structure is documented below.
ForwardingConfig ManagedZoneForwardingConfigPtrInput
// A set of key/value label pairs to assign to this ManagedZone.
Labels pulumi.StringMapInput
// User assigned name for this resource.
// Must be unique within the project.
Name pulumi.StringPtrInput
// Delegate your managed_zone to these virtual name servers; defined by the server
NameServers pulumi.StringArrayInput
// The presence of this field indicates that DNS Peering is enabled for this
// zone. The value of this field contains the network to peer with.
// Structure is documented below.
PeeringConfig ManagedZonePeeringConfigPtrInput
// For privately visible zones, the set of Virtual Private Cloud
// resources that the zone is visible from.
// Structure is documented below.
PrivateVisibilityConfig ManagedZonePrivateVisibilityConfigPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse
// lookup queries using automatically configured records for VPC resources. This only applies
// to networks listed under `privateVisibilityConfig`.
ReverseLookup pulumi.BoolPtrInput
// The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone.
// Structure is documented below.
ServiceDirectoryConfig ManagedZoneServiceDirectoryConfigPtrInput
// The zone's visibility: public zones are exposed to the Internet,
// while private zones are visible only to Virtual Private Cloud resources.
// Default value is `public`.
// Possible values are `private` and `public`.
Visibility pulumi.StringPtrInput
}
func (ManagedZoneState) ElementType() reflect.Type {
return reflect.TypeOf((*managedZoneState)(nil)).Elem()
}
type managedZoneArgs struct {
// A textual description field. Defaults to 'Managed by Pulumi'.
Description *string `pulumi:"description"`
// The DNS name of this managed zone, for instance "example.com.".
DnsName string `pulumi:"dnsName"`
// DNSSEC configuration
// Structure is documented below.
DnssecConfig *ManagedZoneDnssecConfig `pulumi:"dnssecConfig"`
// Set this true to delete all records in the zone.
ForceDestroy *bool `pulumi:"forceDestroy"`
// The presence for this field indicates that outbound forwarding is enabled
// for this zone. The value of this field contains the set of destinations
// to forward to.
// Structure is documented below.
ForwardingConfig *ManagedZoneForwardingConfig `pulumi:"forwardingConfig"`
// A set of key/value label pairs to assign to this ManagedZone.
Labels map[string]string `pulumi:"labels"`
// User assigned name for this resource.
// Must be unique within the project.
Name *string `pulumi:"name"`
// The presence of this field indicates that DNS Peering is enabled for this
// zone. The value of this field contains the network to peer with.
// Structure is documented below.
PeeringConfig *ManagedZonePeeringConfig `pulumi:"peeringConfig"`
// For privately visible zones, the set of Virtual Private Cloud
// resources that the zone is visible from.
// Structure is documented below.
PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `pulumi:"privateVisibilityConfig"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse
// lookup queries using automatically configured records for VPC resources. This only applies
// to networks listed under `privateVisibilityConfig`.
ReverseLookup *bool `pulumi:"reverseLookup"`
// The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone.
// Structure is documented below.
ServiceDirectoryConfig *ManagedZoneServiceDirectoryConfig `pulumi:"serviceDirectoryConfig"`
// The zone's visibility: public zones are exposed to the Internet,
// while private zones are visible only to Virtual Private Cloud resources.
// Default value is `public`.
// Possible values are `private` and `public`.
Visibility *string `pulumi:"visibility"`
}
// The set of arguments for constructing a ManagedZone resource.
type ManagedZoneArgs struct {
// A textual description field. Defaults to 'Managed by Pulumi'.
Description pulumi.StringPtrInput
// The DNS name of this managed zone, for instance "example.com.".
DnsName pulumi.StringInput
// DNSSEC configuration
// Structure is documented below.
DnssecConfig ManagedZoneDnssecConfigPtrInput
// Set this true to delete all records in the zone.
ForceDestroy pulumi.BoolPtrInput
// The presence for this field indicates that outbound forwarding is enabled
// for this zone. The value of this field contains the set of destinations
// to forward to.
// Structure is documented below.
ForwardingConfig ManagedZoneForwardingConfigPtrInput
// A set of key/value label pairs to assign to this ManagedZone.
Labels pulumi.StringMapInput
// User assigned name for this resource.
// Must be unique within the project.
Name pulumi.StringPtrInput
// The presence of this field indicates that DNS Peering is enabled for this
// zone. The value of this field contains the network to peer with.
// Structure is documented below.
PeeringConfig ManagedZonePeeringConfigPtrInput
// For privately visible zones, the set of Virtual Private Cloud
// resources that the zone is visible from.
// Structure is documented below.
PrivateVisibilityConfig ManagedZonePrivateVisibilityConfigPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse
// lookup queries using automatically configured records for VPC resources. This only applies
// to networks listed under `privateVisibilityConfig`.
ReverseLookup pulumi.BoolPtrInput
// The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone.
// Structure is documented below.
ServiceDirectoryConfig ManagedZoneServiceDirectoryConfigPtrInput
// The zone's visibility: public zones are exposed to the Internet,
// while private zones are visible only to Virtual Private Cloud resources.
// Default value is `public`.
// Possible values are `private` and `public`.
Visibility pulumi.StringPtrInput
}
func (ManagedZoneArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managedZoneArgs)(nil)).Elem()
}
type ManagedZoneInput interface {
pulumi.Input
ToManagedZoneOutput() ManagedZoneOutput
ToManagedZoneOutputWithContext(ctx context.Context) ManagedZoneOutput
}
func (*ManagedZone) ElementType() reflect.Type {
return reflect.TypeOf((*ManagedZone)(nil))
}
func (i *ManagedZone) ToManagedZoneOutput() ManagedZoneOutput {
return i.ToManagedZoneOutputWithContext(context.Background())
}
func (i *ManagedZone) ToManagedZoneOutputWithContext(ctx context.Context) ManagedZoneOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedZoneOutput)
}
func (i *ManagedZone) ToManagedZonePtrOutput() ManagedZonePtrOutput {
return i.ToManagedZonePtrOutputWithContext(context.Background())
}
func (i *ManagedZone) ToManagedZonePtrOutputWithContext(ctx context.Context) ManagedZonePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedZonePtrOutput)
}
type ManagedZonePtrInput interface {
pulumi.Input
ToManagedZonePtrOutput() ManagedZonePtrOutput
ToManagedZonePtrOutputWithContext(ctx context.Context) ManagedZonePtrOutput
}
type managedZonePtrType ManagedZoneArgs
func (*managedZonePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedZone)(nil))
}
func (i *managedZonePtrType) ToManagedZonePtrOutput() ManagedZonePtrOutput {
return i.ToManagedZonePtrOutputWithContext(context.Background())
}
func (i *managedZonePtrType) ToManagedZonePtrOutputWithContext(ctx context.Context) ManagedZonePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedZonePtrOutput)
}
// ManagedZoneArrayInput is an input type that accepts ManagedZoneArray and ManagedZoneArrayOutput values.
// You can construct a concrete instance of `ManagedZoneArrayInput` via:
//
// ManagedZoneArray{ ManagedZoneArgs{...} }
type ManagedZoneArrayInput interface {
pulumi.Input
ToManagedZoneArrayOutput() ManagedZoneArrayOutput
ToManagedZoneArrayOutputWithContext(context.Context) ManagedZoneArrayOutput
}
type ManagedZoneArray []ManagedZoneInput
func (ManagedZoneArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagedZone)(nil)).Elem()
}
func (i ManagedZoneArray) ToManagedZoneArrayOutput() ManagedZoneArrayOutput {
return i.ToManagedZoneArrayOutputWithContext(context.Background())
}
func (i ManagedZoneArray) ToManagedZoneArrayOutputWithContext(ctx context.Context) ManagedZoneArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedZoneArrayOutput)
}
// ManagedZoneMapInput is an input type that accepts ManagedZoneMap and ManagedZoneMapOutput values.
// You can construct a concrete instance of `ManagedZoneMapInput` via:
//
// ManagedZoneMap{ "key": ManagedZoneArgs{...} }
type ManagedZoneMapInput interface {
pulumi.Input
ToManagedZoneMapOutput() ManagedZoneMapOutput
ToManagedZoneMapOutputWithContext(context.Context) ManagedZoneMapOutput
}
type ManagedZoneMap map[string]ManagedZoneInput
func (ManagedZoneMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagedZone)(nil)).Elem()
}
func (i ManagedZoneMap) ToManagedZoneMapOutput() ManagedZoneMapOutput {
return i.ToManagedZoneMapOutputWithContext(context.Background())
}
func (i ManagedZoneMap) ToManagedZoneMapOutputWithContext(ctx context.Context) ManagedZoneMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagedZoneMapOutput)
}
type ManagedZoneOutput struct{ *pulumi.OutputState }
func (ManagedZoneOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ManagedZone)(nil))
}
func (o ManagedZoneOutput) ToManagedZoneOutput() ManagedZoneOutput {
return o
}
func (o ManagedZoneOutput) ToManagedZoneOutputWithContext(ctx context.Context) ManagedZoneOutput {
return o
}
func (o ManagedZoneOutput) ToManagedZonePtrOutput() ManagedZonePtrOutput {
return o.ToManagedZonePtrOutputWithContext(context.Background())
}
func (o ManagedZoneOutput) ToManagedZonePtrOutputWithContext(ctx context.Context) ManagedZonePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ManagedZone) *ManagedZone {
return &v
}).(ManagedZonePtrOutput)
}
type ManagedZonePtrOutput struct{ *pulumi.OutputState }
func (ManagedZonePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagedZone)(nil))
}
func (o ManagedZonePtrOutput) ToManagedZonePtrOutput() ManagedZonePtrOutput {
return o
}
func (o ManagedZonePtrOutput) ToManagedZonePtrOutputWithContext(ctx context.Context) ManagedZonePtrOutput {
return o
}
func (o ManagedZonePtrOutput) Elem() ManagedZoneOutput {
return o.ApplyT(func(v *ManagedZone) ManagedZone {
if v != nil {
return *v
}
var ret ManagedZone
return ret
}).(ManagedZoneOutput)
}
type ManagedZoneArrayOutput struct{ *pulumi.OutputState }
func (ManagedZoneArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ManagedZone)(nil))
}
func (o ManagedZoneArrayOutput) ToManagedZoneArrayOutput() ManagedZoneArrayOutput {
return o
}
func (o ManagedZoneArrayOutput) ToManagedZoneArrayOutputWithContext(ctx context.Context) ManagedZoneArrayOutput {
return o
}
func (o ManagedZoneArrayOutput) Index(i pulumi.IntInput) ManagedZoneOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ManagedZone {
return vs[0].([]ManagedZone)[vs[1].(int)]
}).(ManagedZoneOutput)
}
type ManagedZoneMapOutput struct{ *pulumi.OutputState }
func (ManagedZoneMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]ManagedZone)(nil))
}
func (o ManagedZoneMapOutput) ToManagedZoneMapOutput() ManagedZoneMapOutput {
return o
}
func (o ManagedZoneMapOutput) ToManagedZoneMapOutputWithContext(ctx context.Context) ManagedZoneMapOutput {
return o
}
func (o ManagedZoneMapOutput) MapIndex(k pulumi.StringInput) ManagedZoneOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) ManagedZone {
return vs[0].(map[string]ManagedZone)[vs[1].(string)]
}).(ManagedZoneOutput)
}
func init() {
pulumi.RegisterOutputType(ManagedZoneOutput{})
pulumi.RegisterOutputType(ManagedZonePtrOutput{})
pulumi.RegisterOutputType(ManagedZoneArrayOutput{})
pulumi.RegisterOutputType(ManagedZoneMapOutput{})
}