This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
privateCloud.go
291 lines (267 loc) · 11.6 KB
/
privateCloud.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
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20200717preview
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// A private cloud resource
type PrivateCloud struct {
pulumi.CustomResourceState
// An ExpressRoute Circuit
Circuit CircuitResponsePtrOutput `pulumi:"circuit"`
// The endpoints
Endpoints EndpointsResponseOutput `pulumi:"endpoints"`
// vCenter Single Sign On Identity Sources
IdentitySources IdentitySourceResponseArrayOutput `pulumi:"identitySources"`
// Connectivity to internet is enabled or disabled
Internet pulumi.StringPtrOutput `pulumi:"internet"`
// Resource location
Location pulumi.StringOutput `pulumi:"location"`
// The default cluster used for management
ManagementCluster ManagementClusterResponseOutput `pulumi:"managementCluster"`
// Network used to access vCenter Server and NSX-T Manager
ManagementNetwork pulumi.StringOutput `pulumi:"managementNetwork"`
// Resource name.
Name pulumi.StringOutput `pulumi:"name"`
// The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22
NetworkBlock pulumi.StringOutput `pulumi:"networkBlock"`
// Thumbprint of the NSX-T Manager SSL certificate
NsxtCertificateThumbprint pulumi.StringOutput `pulumi:"nsxtCertificateThumbprint"`
// Optionally, set the NSX-T Manager password when the private cloud is created
NsxtPassword pulumi.StringPtrOutput `pulumi:"nsxtPassword"`
// Used for virtual machine cold migration, cloning, and snapshot migration
ProvisioningNetwork pulumi.StringOutput `pulumi:"provisioningNetwork"`
// The provisioning state
ProvisioningState pulumi.StringOutput `pulumi:"provisioningState"`
// The private cloud SKU
Sku SkuResponseOutput `pulumi:"sku"`
// Resource tags
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Resource type.
Type pulumi.StringOutput `pulumi:"type"`
// Thumbprint of the vCenter Server SSL certificate
VcenterCertificateThumbprint pulumi.StringOutput `pulumi:"vcenterCertificateThumbprint"`
// Optionally, set the vCenter admin password when the private cloud is created
VcenterPassword pulumi.StringPtrOutput `pulumi:"vcenterPassword"`
// Used for live migration of virtual machines
VmotionNetwork pulumi.StringOutput `pulumi:"vmotionNetwork"`
}
// NewPrivateCloud registers a new resource with the given unique name, arguments, and options.
func NewPrivateCloud(ctx *pulumi.Context,
name string, args *PrivateCloudArgs, opts ...pulumi.ResourceOption) (*PrivateCloud, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagementCluster == nil {
return nil, errors.New("invalid value for required argument 'ManagementCluster'")
}
if args.NetworkBlock == nil {
return nil, errors.New("invalid value for required argument 'NetworkBlock'")
}
if args.PrivateCloudName == nil {
return nil, errors.New("invalid value for required argument 'PrivateCloudName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
if args.Internet == nil {
args.Internet = pulumi.StringPtr("Disabled")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:avs/latest:PrivateCloud"),
},
{
Type: pulumi.String("azure-nextgen:avs/v20200320:PrivateCloud"),
},
})
opts = append(opts, aliases)
var resource PrivateCloud
err := ctx.RegisterResource("azure-nextgen:avs/v20200717preview:PrivateCloud", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPrivateCloud gets an existing PrivateCloud 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 GetPrivateCloud(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PrivateCloudState, opts ...pulumi.ResourceOption) (*PrivateCloud, error) {
var resource PrivateCloud
err := ctx.ReadResource("azure-nextgen:avs/v20200717preview:PrivateCloud", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PrivateCloud resources.
type privateCloudState struct {
// An ExpressRoute Circuit
Circuit *CircuitResponse `pulumi:"circuit"`
// The endpoints
Endpoints *EndpointsResponse `pulumi:"endpoints"`
// vCenter Single Sign On Identity Sources
IdentitySources []IdentitySourceResponse `pulumi:"identitySources"`
// Connectivity to internet is enabled or disabled
Internet *string `pulumi:"internet"`
// Resource location
Location *string `pulumi:"location"`
// The default cluster used for management
ManagementCluster *ManagementClusterResponse `pulumi:"managementCluster"`
// Network used to access vCenter Server and NSX-T Manager
ManagementNetwork *string `pulumi:"managementNetwork"`
// Resource name.
Name *string `pulumi:"name"`
// The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22
NetworkBlock *string `pulumi:"networkBlock"`
// Thumbprint of the NSX-T Manager SSL certificate
NsxtCertificateThumbprint *string `pulumi:"nsxtCertificateThumbprint"`
// Optionally, set the NSX-T Manager password when the private cloud is created
NsxtPassword *string `pulumi:"nsxtPassword"`
// Used for virtual machine cold migration, cloning, and snapshot migration
ProvisioningNetwork *string `pulumi:"provisioningNetwork"`
// The provisioning state
ProvisioningState *string `pulumi:"provisioningState"`
// The private cloud SKU
Sku *SkuResponse `pulumi:"sku"`
// Resource tags
Tags map[string]string `pulumi:"tags"`
// Resource type.
Type *string `pulumi:"type"`
// Thumbprint of the vCenter Server SSL certificate
VcenterCertificateThumbprint *string `pulumi:"vcenterCertificateThumbprint"`
// Optionally, set the vCenter admin password when the private cloud is created
VcenterPassword *string `pulumi:"vcenterPassword"`
// Used for live migration of virtual machines
VmotionNetwork *string `pulumi:"vmotionNetwork"`
}
type PrivateCloudState struct {
// An ExpressRoute Circuit
Circuit CircuitResponsePtrInput
// The endpoints
Endpoints EndpointsResponsePtrInput
// vCenter Single Sign On Identity Sources
IdentitySources IdentitySourceResponseArrayInput
// Connectivity to internet is enabled or disabled
Internet pulumi.StringPtrInput
// Resource location
Location pulumi.StringPtrInput
// The default cluster used for management
ManagementCluster ManagementClusterResponsePtrInput
// Network used to access vCenter Server and NSX-T Manager
ManagementNetwork pulumi.StringPtrInput
// Resource name.
Name pulumi.StringPtrInput
// The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22
NetworkBlock pulumi.StringPtrInput
// Thumbprint of the NSX-T Manager SSL certificate
NsxtCertificateThumbprint pulumi.StringPtrInput
// Optionally, set the NSX-T Manager password when the private cloud is created
NsxtPassword pulumi.StringPtrInput
// Used for virtual machine cold migration, cloning, and snapshot migration
ProvisioningNetwork pulumi.StringPtrInput
// The provisioning state
ProvisioningState pulumi.StringPtrInput
// The private cloud SKU
Sku SkuResponsePtrInput
// Resource tags
Tags pulumi.StringMapInput
// Resource type.
Type pulumi.StringPtrInput
// Thumbprint of the vCenter Server SSL certificate
VcenterCertificateThumbprint pulumi.StringPtrInput
// Optionally, set the vCenter admin password when the private cloud is created
VcenterPassword pulumi.StringPtrInput
// Used for live migration of virtual machines
VmotionNetwork pulumi.StringPtrInput
}
func (PrivateCloudState) ElementType() reflect.Type {
return reflect.TypeOf((*privateCloudState)(nil)).Elem()
}
type privateCloudArgs struct {
// vCenter Single Sign On Identity Sources
IdentitySources []IdentitySource `pulumi:"identitySources"`
// Connectivity to internet is enabled or disabled
Internet *string `pulumi:"internet"`
// Resource location
Location *string `pulumi:"location"`
// The default cluster used for management
ManagementCluster ManagementCluster `pulumi:"managementCluster"`
// The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22
NetworkBlock string `pulumi:"networkBlock"`
// Optionally, set the NSX-T Manager password when the private cloud is created
NsxtPassword *string `pulumi:"nsxtPassword"`
// Name of the private cloud
PrivateCloudName string `pulumi:"privateCloudName"`
// The name of the resource group. The name is case insensitive.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The private cloud SKU
Sku Sku `pulumi:"sku"`
// Resource tags
Tags map[string]string `pulumi:"tags"`
// Optionally, set the vCenter admin password when the private cloud is created
VcenterPassword *string `pulumi:"vcenterPassword"`
}
// The set of arguments for constructing a PrivateCloud resource.
type PrivateCloudArgs struct {
// vCenter Single Sign On Identity Sources
IdentitySources IdentitySourceArrayInput
// Connectivity to internet is enabled or disabled
Internet pulumi.StringPtrInput
// Resource location
Location pulumi.StringPtrInput
// The default cluster used for management
ManagementCluster ManagementClusterInput
// The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22
NetworkBlock pulumi.StringInput
// Optionally, set the NSX-T Manager password when the private cloud is created
NsxtPassword pulumi.StringPtrInput
// Name of the private cloud
PrivateCloudName pulumi.StringInput
// The name of the resource group. The name is case insensitive.
ResourceGroupName pulumi.StringInput
// The private cloud SKU
Sku SkuInput
// Resource tags
Tags pulumi.StringMapInput
// Optionally, set the vCenter admin password when the private cloud is created
VcenterPassword pulumi.StringPtrInput
}
func (PrivateCloudArgs) ElementType() reflect.Type {
return reflect.TypeOf((*privateCloudArgs)(nil)).Elem()
}
type PrivateCloudInput interface {
pulumi.Input
ToPrivateCloudOutput() PrivateCloudOutput
ToPrivateCloudOutputWithContext(ctx context.Context) PrivateCloudOutput
}
func (*PrivateCloud) ElementType() reflect.Type {
return reflect.TypeOf((*PrivateCloud)(nil))
}
func (i *PrivateCloud) ToPrivateCloudOutput() PrivateCloudOutput {
return i.ToPrivateCloudOutputWithContext(context.Background())
}
func (i *PrivateCloud) ToPrivateCloudOutputWithContext(ctx context.Context) PrivateCloudOutput {
return pulumi.ToOutputWithContext(ctx, i).(PrivateCloudOutput)
}
type PrivateCloudOutput struct {
*pulumi.OutputState
}
func (PrivateCloudOutput) ElementType() reflect.Type {
return reflect.TypeOf((*PrivateCloud)(nil))
}
func (o PrivateCloudOutput) ToPrivateCloudOutput() PrivateCloudOutput {
return o
}
func (o PrivateCloudOutput) ToPrivateCloudOutputWithContext(ctx context.Context) PrivateCloudOutput {
return o
}
func init() {
pulumi.RegisterOutputType(PrivateCloudOutput{})
}