This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
sslServer.go
345 lines (290 loc) · 12.5 KB
/
sslServer.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
// 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 vpn
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type SslServer struct {
pulumi.CustomResourceState
// need compressed. Default value: False.
Compress pulumi.BoolPtrOutput `pulumi:"compress"`
// The encrypt algorithm. Valid values: AES-128-CBC, AES-192-CBC, AES-256-CBC, NONE.Default value: NONE.
EncryptAlgorithm pulumi.StringPtrOutput `pulumi:"encryptAlgorithm"`
// The integrity algorithm. Valid values: SHA1, MD5 and NONE. Default value: NONE.
IntegrityAlgorithm pulumi.StringPtrOutput `pulumi:"integrityAlgorithm"`
// List of local CIDR.
LocalAddresses pulumi.StringArrayOutput `pulumi:"localAddresses"`
// Remote CIDR for client.
RemoteAddress pulumi.StringOutput `pulumi:"remoteAddress"`
// The port of ssl vpn. Default value: 1194.
SslVpnPort pulumi.IntPtrOutput `pulumi:"sslVpnPort"`
// The protocol of ssl vpn. Default value: UDP.
SslVpnProtocol pulumi.StringPtrOutput `pulumi:"sslVpnProtocol"`
// The name of ssl vpn server to be created.
SslVpnServerName pulumi.StringOutput `pulumi:"sslVpnServerName"`
// VPN gateway ID.
VpnGatewayId pulumi.StringOutput `pulumi:"vpnGatewayId"`
}
// NewSslServer registers a new resource with the given unique name, arguments, and options.
func NewSslServer(ctx *pulumi.Context,
name string, args *SslServerArgs, opts ...pulumi.ResourceOption) (*SslServer, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LocalAddresses == nil {
return nil, errors.New("invalid value for required argument 'LocalAddresses'")
}
if args.RemoteAddress == nil {
return nil, errors.New("invalid value for required argument 'RemoteAddress'")
}
if args.SslVpnServerName == nil {
return nil, errors.New("invalid value for required argument 'SslVpnServerName'")
}
if args.VpnGatewayId == nil {
return nil, errors.New("invalid value for required argument 'VpnGatewayId'")
}
var resource SslServer
err := ctx.RegisterResource("tctest:Vpn/sslServer:SslServer", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSslServer gets an existing SslServer 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 GetSslServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SslServerState, opts ...pulumi.ResourceOption) (*SslServer, error) {
var resource SslServer
err := ctx.ReadResource("tctest:Vpn/sslServer:SslServer", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SslServer resources.
type sslServerState struct {
// need compressed. Default value: False.
Compress *bool `pulumi:"compress"`
// The encrypt algorithm. Valid values: AES-128-CBC, AES-192-CBC, AES-256-CBC, NONE.Default value: NONE.
EncryptAlgorithm *string `pulumi:"encryptAlgorithm"`
// The integrity algorithm. Valid values: SHA1, MD5 and NONE. Default value: NONE.
IntegrityAlgorithm *string `pulumi:"integrityAlgorithm"`
// List of local CIDR.
LocalAddresses []string `pulumi:"localAddresses"`
// Remote CIDR for client.
RemoteAddress *string `pulumi:"remoteAddress"`
// The port of ssl vpn. Default value: 1194.
SslVpnPort *int `pulumi:"sslVpnPort"`
// The protocol of ssl vpn. Default value: UDP.
SslVpnProtocol *string `pulumi:"sslVpnProtocol"`
// The name of ssl vpn server to be created.
SslVpnServerName *string `pulumi:"sslVpnServerName"`
// VPN gateway ID.
VpnGatewayId *string `pulumi:"vpnGatewayId"`
}
type SslServerState struct {
// need compressed. Default value: False.
Compress pulumi.BoolPtrInput
// The encrypt algorithm. Valid values: AES-128-CBC, AES-192-CBC, AES-256-CBC, NONE.Default value: NONE.
EncryptAlgorithm pulumi.StringPtrInput
// The integrity algorithm. Valid values: SHA1, MD5 and NONE. Default value: NONE.
IntegrityAlgorithm pulumi.StringPtrInput
// List of local CIDR.
LocalAddresses pulumi.StringArrayInput
// Remote CIDR for client.
RemoteAddress pulumi.StringPtrInput
// The port of ssl vpn. Default value: 1194.
SslVpnPort pulumi.IntPtrInput
// The protocol of ssl vpn. Default value: UDP.
SslVpnProtocol pulumi.StringPtrInput
// The name of ssl vpn server to be created.
SslVpnServerName pulumi.StringPtrInput
// VPN gateway ID.
VpnGatewayId pulumi.StringPtrInput
}
func (SslServerState) ElementType() reflect.Type {
return reflect.TypeOf((*sslServerState)(nil)).Elem()
}
type sslServerArgs struct {
// need compressed. Default value: False.
Compress *bool `pulumi:"compress"`
// The encrypt algorithm. Valid values: AES-128-CBC, AES-192-CBC, AES-256-CBC, NONE.Default value: NONE.
EncryptAlgorithm *string `pulumi:"encryptAlgorithm"`
// The integrity algorithm. Valid values: SHA1, MD5 and NONE. Default value: NONE.
IntegrityAlgorithm *string `pulumi:"integrityAlgorithm"`
// List of local CIDR.
LocalAddresses []string `pulumi:"localAddresses"`
// Remote CIDR for client.
RemoteAddress string `pulumi:"remoteAddress"`
// The port of ssl vpn. Default value: 1194.
SslVpnPort *int `pulumi:"sslVpnPort"`
// The protocol of ssl vpn. Default value: UDP.
SslVpnProtocol *string `pulumi:"sslVpnProtocol"`
// The name of ssl vpn server to be created.
SslVpnServerName string `pulumi:"sslVpnServerName"`
// VPN gateway ID.
VpnGatewayId string `pulumi:"vpnGatewayId"`
}
// The set of arguments for constructing a SslServer resource.
type SslServerArgs struct {
// need compressed. Default value: False.
Compress pulumi.BoolPtrInput
// The encrypt algorithm. Valid values: AES-128-CBC, AES-192-CBC, AES-256-CBC, NONE.Default value: NONE.
EncryptAlgorithm pulumi.StringPtrInput
// The integrity algorithm. Valid values: SHA1, MD5 and NONE. Default value: NONE.
IntegrityAlgorithm pulumi.StringPtrInput
// List of local CIDR.
LocalAddresses pulumi.StringArrayInput
// Remote CIDR for client.
RemoteAddress pulumi.StringInput
// The port of ssl vpn. Default value: 1194.
SslVpnPort pulumi.IntPtrInput
// The protocol of ssl vpn. Default value: UDP.
SslVpnProtocol pulumi.StringPtrInput
// The name of ssl vpn server to be created.
SslVpnServerName pulumi.StringInput
// VPN gateway ID.
VpnGatewayId pulumi.StringInput
}
func (SslServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*sslServerArgs)(nil)).Elem()
}
type SslServerInput interface {
pulumi.Input
ToSslServerOutput() SslServerOutput
ToSslServerOutputWithContext(ctx context.Context) SslServerOutput
}
func (*SslServer) ElementType() reflect.Type {
return reflect.TypeOf((**SslServer)(nil)).Elem()
}
func (i *SslServer) ToSslServerOutput() SslServerOutput {
return i.ToSslServerOutputWithContext(context.Background())
}
func (i *SslServer) ToSslServerOutputWithContext(ctx context.Context) SslServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(SslServerOutput)
}
// SslServerArrayInput is an input type that accepts SslServerArray and SslServerArrayOutput values.
// You can construct a concrete instance of `SslServerArrayInput` via:
//
// SslServerArray{ SslServerArgs{...} }
type SslServerArrayInput interface {
pulumi.Input
ToSslServerArrayOutput() SslServerArrayOutput
ToSslServerArrayOutputWithContext(context.Context) SslServerArrayOutput
}
type SslServerArray []SslServerInput
func (SslServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SslServer)(nil)).Elem()
}
func (i SslServerArray) ToSslServerArrayOutput() SslServerArrayOutput {
return i.ToSslServerArrayOutputWithContext(context.Background())
}
func (i SslServerArray) ToSslServerArrayOutputWithContext(ctx context.Context) SslServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SslServerArrayOutput)
}
// SslServerMapInput is an input type that accepts SslServerMap and SslServerMapOutput values.
// You can construct a concrete instance of `SslServerMapInput` via:
//
// SslServerMap{ "key": SslServerArgs{...} }
type SslServerMapInput interface {
pulumi.Input
ToSslServerMapOutput() SslServerMapOutput
ToSslServerMapOutputWithContext(context.Context) SslServerMapOutput
}
type SslServerMap map[string]SslServerInput
func (SslServerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SslServer)(nil)).Elem()
}
func (i SslServerMap) ToSslServerMapOutput() SslServerMapOutput {
return i.ToSslServerMapOutputWithContext(context.Background())
}
func (i SslServerMap) ToSslServerMapOutputWithContext(ctx context.Context) SslServerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SslServerMapOutput)
}
type SslServerOutput struct{ *pulumi.OutputState }
func (SslServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SslServer)(nil)).Elem()
}
func (o SslServerOutput) ToSslServerOutput() SslServerOutput {
return o
}
func (o SslServerOutput) ToSslServerOutputWithContext(ctx context.Context) SslServerOutput {
return o
}
// need compressed. Default value: False.
func (o SslServerOutput) Compress() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SslServer) pulumi.BoolPtrOutput { return v.Compress }).(pulumi.BoolPtrOutput)
}
// The encrypt algorithm. Valid values: AES-128-CBC, AES-192-CBC, AES-256-CBC, NONE.Default value: NONE.
func (o SslServerOutput) EncryptAlgorithm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SslServer) pulumi.StringPtrOutput { return v.EncryptAlgorithm }).(pulumi.StringPtrOutput)
}
// The integrity algorithm. Valid values: SHA1, MD5 and NONE. Default value: NONE.
func (o SslServerOutput) IntegrityAlgorithm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SslServer) pulumi.StringPtrOutput { return v.IntegrityAlgorithm }).(pulumi.StringPtrOutput)
}
// List of local CIDR.
func (o SslServerOutput) LocalAddresses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SslServer) pulumi.StringArrayOutput { return v.LocalAddresses }).(pulumi.StringArrayOutput)
}
// Remote CIDR for client.
func (o SslServerOutput) RemoteAddress() pulumi.StringOutput {
return o.ApplyT(func(v *SslServer) pulumi.StringOutput { return v.RemoteAddress }).(pulumi.StringOutput)
}
// The port of ssl vpn. Default value: 1194.
func (o SslServerOutput) SslVpnPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SslServer) pulumi.IntPtrOutput { return v.SslVpnPort }).(pulumi.IntPtrOutput)
}
// The protocol of ssl vpn. Default value: UDP.
func (o SslServerOutput) SslVpnProtocol() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SslServer) pulumi.StringPtrOutput { return v.SslVpnProtocol }).(pulumi.StringPtrOutput)
}
// The name of ssl vpn server to be created.
func (o SslServerOutput) SslVpnServerName() pulumi.StringOutput {
return o.ApplyT(func(v *SslServer) pulumi.StringOutput { return v.SslVpnServerName }).(pulumi.StringOutput)
}
// VPN gateway ID.
func (o SslServerOutput) VpnGatewayId() pulumi.StringOutput {
return o.ApplyT(func(v *SslServer) pulumi.StringOutput { return v.VpnGatewayId }).(pulumi.StringOutput)
}
type SslServerArrayOutput struct{ *pulumi.OutputState }
func (SslServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SslServer)(nil)).Elem()
}
func (o SslServerArrayOutput) ToSslServerArrayOutput() SslServerArrayOutput {
return o
}
func (o SslServerArrayOutput) ToSslServerArrayOutputWithContext(ctx context.Context) SslServerArrayOutput {
return o
}
func (o SslServerArrayOutput) Index(i pulumi.IntInput) SslServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SslServer {
return vs[0].([]*SslServer)[vs[1].(int)]
}).(SslServerOutput)
}
type SslServerMapOutput struct{ *pulumi.OutputState }
func (SslServerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SslServer)(nil)).Elem()
}
func (o SslServerMapOutput) ToSslServerMapOutput() SslServerMapOutput {
return o
}
func (o SslServerMapOutput) ToSslServerMapOutputWithContext(ctx context.Context) SslServerMapOutput {
return o
}
func (o SslServerMapOutput) MapIndex(k pulumi.StringInput) SslServerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SslServer {
return vs[0].(map[string]*SslServer)[vs[1].(string)]
}).(SslServerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SslServerInput)(nil)).Elem(), &SslServer{})
pulumi.RegisterInputType(reflect.TypeOf((*SslServerArrayInput)(nil)).Elem(), SslServerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SslServerMapInput)(nil)).Elem(), SslServerMap{})
pulumi.RegisterOutputType(SslServerOutput{})
pulumi.RegisterOutputType(SslServerArrayOutput{})
pulumi.RegisterOutputType(SslServerMapOutput{})
}