generated from pulumi/pulumi-tf-provider-boilerplate
/
vpcPublicGatewayIp.go
345 lines (291 loc) · 13.1 KB
/
vpcPublicGatewayIp.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 scaleway
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates and manages Scaleway VPC Public Gateway IP.
// For more information, see [the documentation](https://developers.scaleway.com/en/products/vpc-gw/api/v1/#ips-268151).
//
// ## Example
//
// ```go
// package main
//
// import (
// "github.com/luxifer/pulumi-scaleway/sdk/go/scaleway"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// main, err := scaleway.NewVpcPublicGatewayIp(ctx, "main", &scaleway.VpcPublicGatewayIpArgs{
// Reverse: pulumi.String("tf.example.com"),
// })
// if err != nil {
// return err
// }
// _, err = scaleway.NewDomainRecord(ctx, "tfA", &scaleway.DomainRecordArgs{
// Data: main.Address,
// DnsZone: pulumi.String("example.com"),
// Priority: pulumi.Int(1),
// Ttl: pulumi.Int(3600),
// Type: pulumi.String("A"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// Public gateway can be imported using the `{zone}/{id}`, e.g. bash
//
// ```sh
// $ pulumi import scaleway:index/vpcPublicGatewayIp:VpcPublicGatewayIp main fr-par-1/11111111-1111-1111-1111-111111111111
// ```
type VpcPublicGatewayIp struct {
pulumi.CustomResourceState
// The IP address itself.
Address pulumi.StringOutput `pulumi:"address"`
// The date and time of the creation of the public gateway ip.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// The organization ID the public gateway ip is associated with.
OrganizationId pulumi.StringOutput `pulumi:"organizationId"`
// `projectId`) The ID of the project the public gateway ip is associated with.
ProjectId pulumi.StringOutput `pulumi:"projectId"`
// The reverse domain name for the IP address
Reverse pulumi.StringOutput `pulumi:"reverse"`
// The tags associated with the public gateway IP.
Tags pulumi.StringArrayOutput `pulumi:"tags"`
// The date and time of the last update of the public gateway ip.
UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"`
// `zone`) The zone in which the public gateway ip should be created.
Zone pulumi.StringOutput `pulumi:"zone"`
}
// NewVpcPublicGatewayIp registers a new resource with the given unique name, arguments, and options.
func NewVpcPublicGatewayIp(ctx *pulumi.Context,
name string, args *VpcPublicGatewayIpArgs, opts ...pulumi.ResourceOption) (*VpcPublicGatewayIp, error) {
if args == nil {
args = &VpcPublicGatewayIpArgs{}
}
opts = pkgResourceDefaultOpts(opts)
var resource VpcPublicGatewayIp
err := ctx.RegisterResource("scaleway:index/vpcPublicGatewayIp:VpcPublicGatewayIp", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVpcPublicGatewayIp gets an existing VpcPublicGatewayIp 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 GetVpcPublicGatewayIp(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VpcPublicGatewayIpState, opts ...pulumi.ResourceOption) (*VpcPublicGatewayIp, error) {
var resource VpcPublicGatewayIp
err := ctx.ReadResource("scaleway:index/vpcPublicGatewayIp:VpcPublicGatewayIp", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VpcPublicGatewayIp resources.
type vpcPublicGatewayIpState struct {
// The IP address itself.
Address *string `pulumi:"address"`
// The date and time of the creation of the public gateway ip.
CreatedAt *string `pulumi:"createdAt"`
// The organization ID the public gateway ip is associated with.
OrganizationId *string `pulumi:"organizationId"`
// `projectId`) The ID of the project the public gateway ip is associated with.
ProjectId *string `pulumi:"projectId"`
// The reverse domain name for the IP address
Reverse *string `pulumi:"reverse"`
// The tags associated with the public gateway IP.
Tags []string `pulumi:"tags"`
// The date and time of the last update of the public gateway ip.
UpdatedAt *string `pulumi:"updatedAt"`
// `zone`) The zone in which the public gateway ip should be created.
Zone *string `pulumi:"zone"`
}
type VpcPublicGatewayIpState struct {
// The IP address itself.
Address pulumi.StringPtrInput
// The date and time of the creation of the public gateway ip.
CreatedAt pulumi.StringPtrInput
// The organization ID the public gateway ip is associated with.
OrganizationId pulumi.StringPtrInput
// `projectId`) The ID of the project the public gateway ip is associated with.
ProjectId pulumi.StringPtrInput
// The reverse domain name for the IP address
Reverse pulumi.StringPtrInput
// The tags associated with the public gateway IP.
Tags pulumi.StringArrayInput
// The date and time of the last update of the public gateway ip.
UpdatedAt pulumi.StringPtrInput
// `zone`) The zone in which the public gateway ip should be created.
Zone pulumi.StringPtrInput
}
func (VpcPublicGatewayIpState) ElementType() reflect.Type {
return reflect.TypeOf((*vpcPublicGatewayIpState)(nil)).Elem()
}
type vpcPublicGatewayIpArgs struct {
// `projectId`) The ID of the project the public gateway ip is associated with.
ProjectId *string `pulumi:"projectId"`
// The reverse domain name for the IP address
Reverse *string `pulumi:"reverse"`
// The tags associated with the public gateway IP.
Tags []string `pulumi:"tags"`
// `zone`) The zone in which the public gateway ip should be created.
Zone *string `pulumi:"zone"`
}
// The set of arguments for constructing a VpcPublicGatewayIp resource.
type VpcPublicGatewayIpArgs struct {
// `projectId`) The ID of the project the public gateway ip is associated with.
ProjectId pulumi.StringPtrInput
// The reverse domain name for the IP address
Reverse pulumi.StringPtrInput
// The tags associated with the public gateway IP.
Tags pulumi.StringArrayInput
// `zone`) The zone in which the public gateway ip should be created.
Zone pulumi.StringPtrInput
}
func (VpcPublicGatewayIpArgs) ElementType() reflect.Type {
return reflect.TypeOf((*vpcPublicGatewayIpArgs)(nil)).Elem()
}
type VpcPublicGatewayIpInput interface {
pulumi.Input
ToVpcPublicGatewayIpOutput() VpcPublicGatewayIpOutput
ToVpcPublicGatewayIpOutputWithContext(ctx context.Context) VpcPublicGatewayIpOutput
}
func (*VpcPublicGatewayIp) ElementType() reflect.Type {
return reflect.TypeOf((**VpcPublicGatewayIp)(nil)).Elem()
}
func (i *VpcPublicGatewayIp) ToVpcPublicGatewayIpOutput() VpcPublicGatewayIpOutput {
return i.ToVpcPublicGatewayIpOutputWithContext(context.Background())
}
func (i *VpcPublicGatewayIp) ToVpcPublicGatewayIpOutputWithContext(ctx context.Context) VpcPublicGatewayIpOutput {
return pulumi.ToOutputWithContext(ctx, i).(VpcPublicGatewayIpOutput)
}
// VpcPublicGatewayIpArrayInput is an input type that accepts VpcPublicGatewayIpArray and VpcPublicGatewayIpArrayOutput values.
// You can construct a concrete instance of `VpcPublicGatewayIpArrayInput` via:
//
// VpcPublicGatewayIpArray{ VpcPublicGatewayIpArgs{...} }
type VpcPublicGatewayIpArrayInput interface {
pulumi.Input
ToVpcPublicGatewayIpArrayOutput() VpcPublicGatewayIpArrayOutput
ToVpcPublicGatewayIpArrayOutputWithContext(context.Context) VpcPublicGatewayIpArrayOutput
}
type VpcPublicGatewayIpArray []VpcPublicGatewayIpInput
func (VpcPublicGatewayIpArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VpcPublicGatewayIp)(nil)).Elem()
}
func (i VpcPublicGatewayIpArray) ToVpcPublicGatewayIpArrayOutput() VpcPublicGatewayIpArrayOutput {
return i.ToVpcPublicGatewayIpArrayOutputWithContext(context.Background())
}
func (i VpcPublicGatewayIpArray) ToVpcPublicGatewayIpArrayOutputWithContext(ctx context.Context) VpcPublicGatewayIpArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VpcPublicGatewayIpArrayOutput)
}
// VpcPublicGatewayIpMapInput is an input type that accepts VpcPublicGatewayIpMap and VpcPublicGatewayIpMapOutput values.
// You can construct a concrete instance of `VpcPublicGatewayIpMapInput` via:
//
// VpcPublicGatewayIpMap{ "key": VpcPublicGatewayIpArgs{...} }
type VpcPublicGatewayIpMapInput interface {
pulumi.Input
ToVpcPublicGatewayIpMapOutput() VpcPublicGatewayIpMapOutput
ToVpcPublicGatewayIpMapOutputWithContext(context.Context) VpcPublicGatewayIpMapOutput
}
type VpcPublicGatewayIpMap map[string]VpcPublicGatewayIpInput
func (VpcPublicGatewayIpMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VpcPublicGatewayIp)(nil)).Elem()
}
func (i VpcPublicGatewayIpMap) ToVpcPublicGatewayIpMapOutput() VpcPublicGatewayIpMapOutput {
return i.ToVpcPublicGatewayIpMapOutputWithContext(context.Background())
}
func (i VpcPublicGatewayIpMap) ToVpcPublicGatewayIpMapOutputWithContext(ctx context.Context) VpcPublicGatewayIpMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VpcPublicGatewayIpMapOutput)
}
type VpcPublicGatewayIpOutput struct{ *pulumi.OutputState }
func (VpcPublicGatewayIpOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VpcPublicGatewayIp)(nil)).Elem()
}
func (o VpcPublicGatewayIpOutput) ToVpcPublicGatewayIpOutput() VpcPublicGatewayIpOutput {
return o
}
func (o VpcPublicGatewayIpOutput) ToVpcPublicGatewayIpOutputWithContext(ctx context.Context) VpcPublicGatewayIpOutput {
return o
}
// The IP address itself.
func (o VpcPublicGatewayIpOutput) Address() pulumi.StringOutput {
return o.ApplyT(func(v *VpcPublicGatewayIp) pulumi.StringOutput { return v.Address }).(pulumi.StringOutput)
}
// The date and time of the creation of the public gateway ip.
func (o VpcPublicGatewayIpOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *VpcPublicGatewayIp) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// The organization ID the public gateway ip is associated with.
func (o VpcPublicGatewayIpOutput) OrganizationId() pulumi.StringOutput {
return o.ApplyT(func(v *VpcPublicGatewayIp) pulumi.StringOutput { return v.OrganizationId }).(pulumi.StringOutput)
}
// `projectId`) The ID of the project the public gateway ip is associated with.
func (o VpcPublicGatewayIpOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v *VpcPublicGatewayIp) pulumi.StringOutput { return v.ProjectId }).(pulumi.StringOutput)
}
// The reverse domain name for the IP address
func (o VpcPublicGatewayIpOutput) Reverse() pulumi.StringOutput {
return o.ApplyT(func(v *VpcPublicGatewayIp) pulumi.StringOutput { return v.Reverse }).(pulumi.StringOutput)
}
// The tags associated with the public gateway IP.
func (o VpcPublicGatewayIpOutput) Tags() pulumi.StringArrayOutput {
return o.ApplyT(func(v *VpcPublicGatewayIp) pulumi.StringArrayOutput { return v.Tags }).(pulumi.StringArrayOutput)
}
// The date and time of the last update of the public gateway ip.
func (o VpcPublicGatewayIpOutput) UpdatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *VpcPublicGatewayIp) pulumi.StringOutput { return v.UpdatedAt }).(pulumi.StringOutput)
}
// `zone`) The zone in which the public gateway ip should be created.
func (o VpcPublicGatewayIpOutput) Zone() pulumi.StringOutput {
return o.ApplyT(func(v *VpcPublicGatewayIp) pulumi.StringOutput { return v.Zone }).(pulumi.StringOutput)
}
type VpcPublicGatewayIpArrayOutput struct{ *pulumi.OutputState }
func (VpcPublicGatewayIpArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VpcPublicGatewayIp)(nil)).Elem()
}
func (o VpcPublicGatewayIpArrayOutput) ToVpcPublicGatewayIpArrayOutput() VpcPublicGatewayIpArrayOutput {
return o
}
func (o VpcPublicGatewayIpArrayOutput) ToVpcPublicGatewayIpArrayOutputWithContext(ctx context.Context) VpcPublicGatewayIpArrayOutput {
return o
}
func (o VpcPublicGatewayIpArrayOutput) Index(i pulumi.IntInput) VpcPublicGatewayIpOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpcPublicGatewayIp {
return vs[0].([]*VpcPublicGatewayIp)[vs[1].(int)]
}).(VpcPublicGatewayIpOutput)
}
type VpcPublicGatewayIpMapOutput struct{ *pulumi.OutputState }
func (VpcPublicGatewayIpMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VpcPublicGatewayIp)(nil)).Elem()
}
func (o VpcPublicGatewayIpMapOutput) ToVpcPublicGatewayIpMapOutput() VpcPublicGatewayIpMapOutput {
return o
}
func (o VpcPublicGatewayIpMapOutput) ToVpcPublicGatewayIpMapOutputWithContext(ctx context.Context) VpcPublicGatewayIpMapOutput {
return o
}
func (o VpcPublicGatewayIpMapOutput) MapIndex(k pulumi.StringInput) VpcPublicGatewayIpOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpcPublicGatewayIp {
return vs[0].(map[string]*VpcPublicGatewayIp)[vs[1].(string)]
}).(VpcPublicGatewayIpOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VpcPublicGatewayIpInput)(nil)).Elem(), &VpcPublicGatewayIp{})
pulumi.RegisterInputType(reflect.TypeOf((*VpcPublicGatewayIpArrayInput)(nil)).Elem(), VpcPublicGatewayIpArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VpcPublicGatewayIpMapInput)(nil)).Elem(), VpcPublicGatewayIpMap{})
pulumi.RegisterOutputType(VpcPublicGatewayIpOutput{})
pulumi.RegisterOutputType(VpcPublicGatewayIpArrayOutput{})
pulumi.RegisterOutputType(VpcPublicGatewayIpMapOutput{})
}