/
meshSecretValue.go
316 lines (256 loc) · 12.5 KB
/
meshSecretValue.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
// *** 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! ***
package servicefabric
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// ## Import
//
// Service Fabric Mesh Secret Value can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicefabric/meshSecretValue:MeshSecretValue value1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceFabricMesh/secrets/secret1/values/value1
// ```
type MeshSecretValue struct {
pulumi.CustomResourceState
// Specifies the Azure Region where the Service Fabric Mesh Secret Value should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Service Fabric Mesh Secret Value. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The id of the Service Fabric Mesh Secret in which the value will be applied to. Changing this forces a new resource to be created.
ServiceFabricMeshSecretId pulumi.StringOutput `pulumi:"serviceFabricMeshSecretId"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Specifies the value that will be applied to the Service Fabric Mesh Secret. Changing this forces a new resource to be created.
Value pulumi.StringOutput `pulumi:"value"`
}
// NewMeshSecretValue registers a new resource with the given unique name, arguments, and options.
func NewMeshSecretValue(ctx *pulumi.Context,
name string, args *MeshSecretValueArgs, opts ...pulumi.ResourceOption) (*MeshSecretValue, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ServiceFabricMeshSecretId == nil {
return nil, errors.New("invalid value for required argument 'ServiceFabricMeshSecretId'")
}
if args.Value == nil {
return nil, errors.New("invalid value for required argument 'Value'")
}
var resource MeshSecretValue
err := ctx.RegisterResource("azure:servicefabric/meshSecretValue:MeshSecretValue", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMeshSecretValue gets an existing MeshSecretValue 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 GetMeshSecretValue(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MeshSecretValueState, opts ...pulumi.ResourceOption) (*MeshSecretValue, error) {
var resource MeshSecretValue
err := ctx.ReadResource("azure:servicefabric/meshSecretValue:MeshSecretValue", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MeshSecretValue resources.
type meshSecretValueState struct {
// Specifies the Azure Region where the Service Fabric Mesh Secret Value should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Service Fabric Mesh Secret Value. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The id of the Service Fabric Mesh Secret in which the value will be applied to. Changing this forces a new resource to be created.
ServiceFabricMeshSecretId *string `pulumi:"serviceFabricMeshSecretId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Specifies the value that will be applied to the Service Fabric Mesh Secret. Changing this forces a new resource to be created.
Value *string `pulumi:"value"`
}
type MeshSecretValueState struct {
// Specifies the Azure Region where the Service Fabric Mesh Secret Value should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Service Fabric Mesh Secret Value. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The id of the Service Fabric Mesh Secret in which the value will be applied to. Changing this forces a new resource to be created.
ServiceFabricMeshSecretId pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Specifies the value that will be applied to the Service Fabric Mesh Secret. Changing this forces a new resource to be created.
Value pulumi.StringPtrInput
}
func (MeshSecretValueState) ElementType() reflect.Type {
return reflect.TypeOf((*meshSecretValueState)(nil)).Elem()
}
type meshSecretValueArgs struct {
// Specifies the Azure Region where the Service Fabric Mesh Secret Value should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Service Fabric Mesh Secret Value. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The id of the Service Fabric Mesh Secret in which the value will be applied to. Changing this forces a new resource to be created.
ServiceFabricMeshSecretId string `pulumi:"serviceFabricMeshSecretId"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Specifies the value that will be applied to the Service Fabric Mesh Secret. Changing this forces a new resource to be created.
Value string `pulumi:"value"`
}
// The set of arguments for constructing a MeshSecretValue resource.
type MeshSecretValueArgs struct {
// Specifies the Azure Region where the Service Fabric Mesh Secret Value should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Service Fabric Mesh Secret Value. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The id of the Service Fabric Mesh Secret in which the value will be applied to. Changing this forces a new resource to be created.
ServiceFabricMeshSecretId pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Specifies the value that will be applied to the Service Fabric Mesh Secret. Changing this forces a new resource to be created.
Value pulumi.StringInput
}
func (MeshSecretValueArgs) ElementType() reflect.Type {
return reflect.TypeOf((*meshSecretValueArgs)(nil)).Elem()
}
type MeshSecretValueInput interface {
pulumi.Input
ToMeshSecretValueOutput() MeshSecretValueOutput
ToMeshSecretValueOutputWithContext(ctx context.Context) MeshSecretValueOutput
}
func (*MeshSecretValue) ElementType() reflect.Type {
return reflect.TypeOf((*MeshSecretValue)(nil))
}
func (i *MeshSecretValue) ToMeshSecretValueOutput() MeshSecretValueOutput {
return i.ToMeshSecretValueOutputWithContext(context.Background())
}
func (i *MeshSecretValue) ToMeshSecretValueOutputWithContext(ctx context.Context) MeshSecretValueOutput {
return pulumi.ToOutputWithContext(ctx, i).(MeshSecretValueOutput)
}
func (i *MeshSecretValue) ToMeshSecretValuePtrOutput() MeshSecretValuePtrOutput {
return i.ToMeshSecretValuePtrOutputWithContext(context.Background())
}
func (i *MeshSecretValue) ToMeshSecretValuePtrOutputWithContext(ctx context.Context) MeshSecretValuePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MeshSecretValuePtrOutput)
}
type MeshSecretValuePtrInput interface {
pulumi.Input
ToMeshSecretValuePtrOutput() MeshSecretValuePtrOutput
ToMeshSecretValuePtrOutputWithContext(ctx context.Context) MeshSecretValuePtrOutput
}
type meshSecretValuePtrType MeshSecretValueArgs
func (*meshSecretValuePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**MeshSecretValue)(nil))
}
func (i *meshSecretValuePtrType) ToMeshSecretValuePtrOutput() MeshSecretValuePtrOutput {
return i.ToMeshSecretValuePtrOutputWithContext(context.Background())
}
func (i *meshSecretValuePtrType) ToMeshSecretValuePtrOutputWithContext(ctx context.Context) MeshSecretValuePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(MeshSecretValuePtrOutput)
}
// MeshSecretValueArrayInput is an input type that accepts MeshSecretValueArray and MeshSecretValueArrayOutput values.
// You can construct a concrete instance of `MeshSecretValueArrayInput` via:
//
// MeshSecretValueArray{ MeshSecretValueArgs{...} }
type MeshSecretValueArrayInput interface {
pulumi.Input
ToMeshSecretValueArrayOutput() MeshSecretValueArrayOutput
ToMeshSecretValueArrayOutputWithContext(context.Context) MeshSecretValueArrayOutput
}
type MeshSecretValueArray []MeshSecretValueInput
func (MeshSecretValueArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*MeshSecretValue)(nil))
}
func (i MeshSecretValueArray) ToMeshSecretValueArrayOutput() MeshSecretValueArrayOutput {
return i.ToMeshSecretValueArrayOutputWithContext(context.Background())
}
func (i MeshSecretValueArray) ToMeshSecretValueArrayOutputWithContext(ctx context.Context) MeshSecretValueArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MeshSecretValueArrayOutput)
}
// MeshSecretValueMapInput is an input type that accepts MeshSecretValueMap and MeshSecretValueMapOutput values.
// You can construct a concrete instance of `MeshSecretValueMapInput` via:
//
// MeshSecretValueMap{ "key": MeshSecretValueArgs{...} }
type MeshSecretValueMapInput interface {
pulumi.Input
ToMeshSecretValueMapOutput() MeshSecretValueMapOutput
ToMeshSecretValueMapOutputWithContext(context.Context) MeshSecretValueMapOutput
}
type MeshSecretValueMap map[string]MeshSecretValueInput
func (MeshSecretValueMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*MeshSecretValue)(nil))
}
func (i MeshSecretValueMap) ToMeshSecretValueMapOutput() MeshSecretValueMapOutput {
return i.ToMeshSecretValueMapOutputWithContext(context.Background())
}
func (i MeshSecretValueMap) ToMeshSecretValueMapOutputWithContext(ctx context.Context) MeshSecretValueMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MeshSecretValueMapOutput)
}
type MeshSecretValueOutput struct {
*pulumi.OutputState
}
func (MeshSecretValueOutput) ElementType() reflect.Type {
return reflect.TypeOf((*MeshSecretValue)(nil))
}
func (o MeshSecretValueOutput) ToMeshSecretValueOutput() MeshSecretValueOutput {
return o
}
func (o MeshSecretValueOutput) ToMeshSecretValueOutputWithContext(ctx context.Context) MeshSecretValueOutput {
return o
}
func (o MeshSecretValueOutput) ToMeshSecretValuePtrOutput() MeshSecretValuePtrOutput {
return o.ToMeshSecretValuePtrOutputWithContext(context.Background())
}
func (o MeshSecretValueOutput) ToMeshSecretValuePtrOutputWithContext(ctx context.Context) MeshSecretValuePtrOutput {
return o.ApplyT(func(v MeshSecretValue) *MeshSecretValue {
return &v
}).(MeshSecretValuePtrOutput)
}
type MeshSecretValuePtrOutput struct {
*pulumi.OutputState
}
func (MeshSecretValuePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MeshSecretValue)(nil))
}
func (o MeshSecretValuePtrOutput) ToMeshSecretValuePtrOutput() MeshSecretValuePtrOutput {
return o
}
func (o MeshSecretValuePtrOutput) ToMeshSecretValuePtrOutputWithContext(ctx context.Context) MeshSecretValuePtrOutput {
return o
}
type MeshSecretValueArrayOutput struct{ *pulumi.OutputState }
func (MeshSecretValueArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]MeshSecretValue)(nil))
}
func (o MeshSecretValueArrayOutput) ToMeshSecretValueArrayOutput() MeshSecretValueArrayOutput {
return o
}
func (o MeshSecretValueArrayOutput) ToMeshSecretValueArrayOutputWithContext(ctx context.Context) MeshSecretValueArrayOutput {
return o
}
func (o MeshSecretValueArrayOutput) Index(i pulumi.IntInput) MeshSecretValueOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) MeshSecretValue {
return vs[0].([]MeshSecretValue)[vs[1].(int)]
}).(MeshSecretValueOutput)
}
type MeshSecretValueMapOutput struct{ *pulumi.OutputState }
func (MeshSecretValueMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]MeshSecretValue)(nil))
}
func (o MeshSecretValueMapOutput) ToMeshSecretValueMapOutput() MeshSecretValueMapOutput {
return o
}
func (o MeshSecretValueMapOutput) ToMeshSecretValueMapOutputWithContext(ctx context.Context) MeshSecretValueMapOutput {
return o
}
func (o MeshSecretValueMapOutput) MapIndex(k pulumi.StringInput) MeshSecretValueOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) MeshSecretValue {
return vs[0].(map[string]MeshSecretValue)[vs[1].(string)]
}).(MeshSecretValueOutput)
}
func init() {
pulumi.RegisterOutputType(MeshSecretValueOutput{})
pulumi.RegisterOutputType(MeshSecretValuePtrOutput{})
pulumi.RegisterOutputType(MeshSecretValueArrayOutput{})
pulumi.RegisterOutputType(MeshSecretValueMapOutput{})
}