/
expressRouteAuthorization.go
319 lines (269 loc) · 15 KB
/
expressRouteAuthorization.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
// 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 avs
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Azure VMware Solution ExpressRoute Circuit Authorization.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/avs"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "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
// }
// examplePrivateCloud, err := avs.NewPrivateCloud(ctx, "example", &avs.PrivateCloudArgs{
// Name: pulumi.String("example-vmware-private-cloud"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SkuName: pulumi.String("av36"),
// ManagementCluster: &avs.PrivateCloudManagementClusterArgs{
// Size: pulumi.Int(3),
// },
// NetworkSubnetCidr: pulumi.String("192.168.48.0/22"),
// InternetConnectionEnabled: pulumi.Bool(false),
// NsxtPassword: pulumi.String("QazWsx13$Edc"),
// VcenterPassword: pulumi.String("WsxEdc23$Rfv"),
// })
// if err != nil {
// return err
// }
// _, err = avs.NewExpressRouteAuthorization(ctx, "example", &avs.ExpressRouteAuthorizationArgs{
// Name: pulumi.String("example-authorization"),
// PrivateCloudId: examplePrivateCloud.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Azure VMware Solution ExpressRoute Circuit Authorizations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:avs/expressRouteAuthorization:ExpressRouteAuthorization example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AVS/privateClouds/privateCloud1/authorizations/authorization1
// ```
type ExpressRouteAuthorization struct {
pulumi.CustomResourceState
// The ID of the Azure VMware Solution ExpressRoute Circuit Authorization.
ExpressRouteAuthorizationId pulumi.StringOutput `pulumi:"expressRouteAuthorizationId"`
// The key of the Azure VMware Solution ExpressRoute Circuit Authorization.
ExpressRouteAuthorizationKey pulumi.StringOutput `pulumi:"expressRouteAuthorizationKey"`
// The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
PrivateCloudId pulumi.StringOutput `pulumi:"privateCloudId"`
}
// NewExpressRouteAuthorization registers a new resource with the given unique name, arguments, and options.
func NewExpressRouteAuthorization(ctx *pulumi.Context,
name string, args *ExpressRouteAuthorizationArgs, opts ...pulumi.ResourceOption) (*ExpressRouteAuthorization, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PrivateCloudId == nil {
return nil, errors.New("invalid value for required argument 'PrivateCloudId'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"expressRouteAuthorizationKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ExpressRouteAuthorization
err := ctx.RegisterResource("azure:avs/expressRouteAuthorization:ExpressRouteAuthorization", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetExpressRouteAuthorization gets an existing ExpressRouteAuthorization 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 GetExpressRouteAuthorization(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ExpressRouteAuthorizationState, opts ...pulumi.ResourceOption) (*ExpressRouteAuthorization, error) {
var resource ExpressRouteAuthorization
err := ctx.ReadResource("azure:avs/expressRouteAuthorization:ExpressRouteAuthorization", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ExpressRouteAuthorization resources.
type expressRouteAuthorizationState struct {
// The ID of the Azure VMware Solution ExpressRoute Circuit Authorization.
ExpressRouteAuthorizationId *string `pulumi:"expressRouteAuthorizationId"`
// The key of the Azure VMware Solution ExpressRoute Circuit Authorization.
ExpressRouteAuthorizationKey *string `pulumi:"expressRouteAuthorizationKey"`
// The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
Name *string `pulumi:"name"`
// The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
PrivateCloudId *string `pulumi:"privateCloudId"`
}
type ExpressRouteAuthorizationState struct {
// The ID of the Azure VMware Solution ExpressRoute Circuit Authorization.
ExpressRouteAuthorizationId pulumi.StringPtrInput
// The key of the Azure VMware Solution ExpressRoute Circuit Authorization.
ExpressRouteAuthorizationKey pulumi.StringPtrInput
// The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
Name pulumi.StringPtrInput
// The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
PrivateCloudId pulumi.StringPtrInput
}
func (ExpressRouteAuthorizationState) ElementType() reflect.Type {
return reflect.TypeOf((*expressRouteAuthorizationState)(nil)).Elem()
}
type expressRouteAuthorizationArgs struct {
// The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
Name *string `pulumi:"name"`
// The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
PrivateCloudId string `pulumi:"privateCloudId"`
}
// The set of arguments for constructing a ExpressRouteAuthorization resource.
type ExpressRouteAuthorizationArgs struct {
// The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
Name pulumi.StringPtrInput
// The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
PrivateCloudId pulumi.StringInput
}
func (ExpressRouteAuthorizationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*expressRouteAuthorizationArgs)(nil)).Elem()
}
type ExpressRouteAuthorizationInput interface {
pulumi.Input
ToExpressRouteAuthorizationOutput() ExpressRouteAuthorizationOutput
ToExpressRouteAuthorizationOutputWithContext(ctx context.Context) ExpressRouteAuthorizationOutput
}
func (*ExpressRouteAuthorization) ElementType() reflect.Type {
return reflect.TypeOf((**ExpressRouteAuthorization)(nil)).Elem()
}
func (i *ExpressRouteAuthorization) ToExpressRouteAuthorizationOutput() ExpressRouteAuthorizationOutput {
return i.ToExpressRouteAuthorizationOutputWithContext(context.Background())
}
func (i *ExpressRouteAuthorization) ToExpressRouteAuthorizationOutputWithContext(ctx context.Context) ExpressRouteAuthorizationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteAuthorizationOutput)
}
// ExpressRouteAuthorizationArrayInput is an input type that accepts ExpressRouteAuthorizationArray and ExpressRouteAuthorizationArrayOutput values.
// You can construct a concrete instance of `ExpressRouteAuthorizationArrayInput` via:
//
// ExpressRouteAuthorizationArray{ ExpressRouteAuthorizationArgs{...} }
type ExpressRouteAuthorizationArrayInput interface {
pulumi.Input
ToExpressRouteAuthorizationArrayOutput() ExpressRouteAuthorizationArrayOutput
ToExpressRouteAuthorizationArrayOutputWithContext(context.Context) ExpressRouteAuthorizationArrayOutput
}
type ExpressRouteAuthorizationArray []ExpressRouteAuthorizationInput
func (ExpressRouteAuthorizationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ExpressRouteAuthorization)(nil)).Elem()
}
func (i ExpressRouteAuthorizationArray) ToExpressRouteAuthorizationArrayOutput() ExpressRouteAuthorizationArrayOutput {
return i.ToExpressRouteAuthorizationArrayOutputWithContext(context.Background())
}
func (i ExpressRouteAuthorizationArray) ToExpressRouteAuthorizationArrayOutputWithContext(ctx context.Context) ExpressRouteAuthorizationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteAuthorizationArrayOutput)
}
// ExpressRouteAuthorizationMapInput is an input type that accepts ExpressRouteAuthorizationMap and ExpressRouteAuthorizationMapOutput values.
// You can construct a concrete instance of `ExpressRouteAuthorizationMapInput` via:
//
// ExpressRouteAuthorizationMap{ "key": ExpressRouteAuthorizationArgs{...} }
type ExpressRouteAuthorizationMapInput interface {
pulumi.Input
ToExpressRouteAuthorizationMapOutput() ExpressRouteAuthorizationMapOutput
ToExpressRouteAuthorizationMapOutputWithContext(context.Context) ExpressRouteAuthorizationMapOutput
}
type ExpressRouteAuthorizationMap map[string]ExpressRouteAuthorizationInput
func (ExpressRouteAuthorizationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ExpressRouteAuthorization)(nil)).Elem()
}
func (i ExpressRouteAuthorizationMap) ToExpressRouteAuthorizationMapOutput() ExpressRouteAuthorizationMapOutput {
return i.ToExpressRouteAuthorizationMapOutputWithContext(context.Background())
}
func (i ExpressRouteAuthorizationMap) ToExpressRouteAuthorizationMapOutputWithContext(ctx context.Context) ExpressRouteAuthorizationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteAuthorizationMapOutput)
}
type ExpressRouteAuthorizationOutput struct{ *pulumi.OutputState }
func (ExpressRouteAuthorizationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ExpressRouteAuthorization)(nil)).Elem()
}
func (o ExpressRouteAuthorizationOutput) ToExpressRouteAuthorizationOutput() ExpressRouteAuthorizationOutput {
return o
}
func (o ExpressRouteAuthorizationOutput) ToExpressRouteAuthorizationOutputWithContext(ctx context.Context) ExpressRouteAuthorizationOutput {
return o
}
// The ID of the Azure VMware Solution ExpressRoute Circuit Authorization.
func (o ExpressRouteAuthorizationOutput) ExpressRouteAuthorizationId() pulumi.StringOutput {
return o.ApplyT(func(v *ExpressRouteAuthorization) pulumi.StringOutput { return v.ExpressRouteAuthorizationId }).(pulumi.StringOutput)
}
// The key of the Azure VMware Solution ExpressRoute Circuit Authorization.
func (o ExpressRouteAuthorizationOutput) ExpressRouteAuthorizationKey() pulumi.StringOutput {
return o.ApplyT(func(v *ExpressRouteAuthorization) pulumi.StringOutput { return v.ExpressRouteAuthorizationKey }).(pulumi.StringOutput)
}
// The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
func (o ExpressRouteAuthorizationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ExpressRouteAuthorization) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created.
func (o ExpressRouteAuthorizationOutput) PrivateCloudId() pulumi.StringOutput {
return o.ApplyT(func(v *ExpressRouteAuthorization) pulumi.StringOutput { return v.PrivateCloudId }).(pulumi.StringOutput)
}
type ExpressRouteAuthorizationArrayOutput struct{ *pulumi.OutputState }
func (ExpressRouteAuthorizationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ExpressRouteAuthorization)(nil)).Elem()
}
func (o ExpressRouteAuthorizationArrayOutput) ToExpressRouteAuthorizationArrayOutput() ExpressRouteAuthorizationArrayOutput {
return o
}
func (o ExpressRouteAuthorizationArrayOutput) ToExpressRouteAuthorizationArrayOutputWithContext(ctx context.Context) ExpressRouteAuthorizationArrayOutput {
return o
}
func (o ExpressRouteAuthorizationArrayOutput) Index(i pulumi.IntInput) ExpressRouteAuthorizationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRouteAuthorization {
return vs[0].([]*ExpressRouteAuthorization)[vs[1].(int)]
}).(ExpressRouteAuthorizationOutput)
}
type ExpressRouteAuthorizationMapOutput struct{ *pulumi.OutputState }
func (ExpressRouteAuthorizationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ExpressRouteAuthorization)(nil)).Elem()
}
func (o ExpressRouteAuthorizationMapOutput) ToExpressRouteAuthorizationMapOutput() ExpressRouteAuthorizationMapOutput {
return o
}
func (o ExpressRouteAuthorizationMapOutput) ToExpressRouteAuthorizationMapOutputWithContext(ctx context.Context) ExpressRouteAuthorizationMapOutput {
return o
}
func (o ExpressRouteAuthorizationMapOutput) MapIndex(k pulumi.StringInput) ExpressRouteAuthorizationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRouteAuthorization {
return vs[0].(map[string]*ExpressRouteAuthorization)[vs[1].(string)]
}).(ExpressRouteAuthorizationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteAuthorizationInput)(nil)).Elem(), &ExpressRouteAuthorization{})
pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteAuthorizationArrayInput)(nil)).Elem(), ExpressRouteAuthorizationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteAuthorizationMapInput)(nil)).Elem(), ExpressRouteAuthorizationMap{})
pulumi.RegisterOutputType(ExpressRouteAuthorizationOutput{})
pulumi.RegisterOutputType(ExpressRouteAuthorizationArrayOutput{})
pulumi.RegisterOutputType(ExpressRouteAuthorizationMapOutput{})
}