/
zoneVirtualNetworkLink.go
137 lines (124 loc) · 7.35 KB
/
zoneVirtualNetworkLink.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
// *** 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! ***
// nolint: lll
package privatedns
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Enables you to manage Private DNS zone Virtual Network Links. These Links enable DNS resolution and registration inside Azure Virtual Networks using Azure Private DNS.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/private_dns_zone_virtual_network_link.html.markdown.
type ZoneVirtualNetworkLink struct {
pulumi.CustomResourceState
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName pulumi.StringOutput `pulumi:"privateDnsZoneName"`
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled pulumi.BoolPtrOutput `pulumi:"registrationEnabled"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Resource ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId pulumi.StringOutput `pulumi:"virtualNetworkId"`
}
// NewZoneVirtualNetworkLink registers a new resource with the given unique name, arguments, and options.
func NewZoneVirtualNetworkLink(ctx *pulumi.Context,
name string, args *ZoneVirtualNetworkLinkArgs, opts ...pulumi.ResourceOption) (*ZoneVirtualNetworkLink, error) {
if args == nil || args.PrivateDnsZoneName == nil {
return nil, errors.New("missing required argument 'PrivateDnsZoneName'")
}
if args == nil || args.ResourceGroupName == nil {
return nil, errors.New("missing required argument 'ResourceGroupName'")
}
if args == nil || args.VirtualNetworkId == nil {
return nil, errors.New("missing required argument 'VirtualNetworkId'")
}
if args == nil {
args = &ZoneVirtualNetworkLinkArgs{}
}
var resource ZoneVirtualNetworkLink
err := ctx.RegisterResource("azure:privatedns/zoneVirtualNetworkLink:ZoneVirtualNetworkLink", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetZoneVirtualNetworkLink gets an existing ZoneVirtualNetworkLink 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 GetZoneVirtualNetworkLink(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ZoneVirtualNetworkLinkState, opts ...pulumi.ResourceOption) (*ZoneVirtualNetworkLink, error) {
var resource ZoneVirtualNetworkLink
err := ctx.ReadResource("azure:privatedns/zoneVirtualNetworkLink:ZoneVirtualNetworkLink", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ZoneVirtualNetworkLink resources.
type zoneVirtualNetworkLinkState struct {
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName *string `pulumi:"privateDnsZoneName"`
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled *bool `pulumi:"registrationEnabled"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Resource ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId *string `pulumi:"virtualNetworkId"`
}
type ZoneVirtualNetworkLinkState struct {
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName pulumi.StringPtrInput
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled pulumi.BoolPtrInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Resource ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId pulumi.StringPtrInput
}
func (ZoneVirtualNetworkLinkState) ElementType() reflect.Type {
return reflect.TypeOf((*zoneVirtualNetworkLinkState)(nil)).Elem()
}
type zoneVirtualNetworkLinkArgs struct {
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName string `pulumi:"privateDnsZoneName"`
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled *bool `pulumi:"registrationEnabled"`
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The Resource ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId string `pulumi:"virtualNetworkId"`
}
// The set of arguments for constructing a ZoneVirtualNetworkLink resource.
type ZoneVirtualNetworkLinkArgs struct {
// The name of the Private DNS Zone Virtual Network Link. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created.
PrivateDnsZoneName pulumi.StringInput
// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to `false`.
RegistrationEnabled pulumi.BoolPtrInput
// Specifies the resource group where the resource exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The Resource ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created.
VirtualNetworkId pulumi.StringInput
}
func (ZoneVirtualNetworkLinkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*zoneVirtualNetworkLinkArgs)(nil)).Elem()
}