/
integration.go
521 lines (460 loc) · 30.5 KB
/
integration.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
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
// 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 azure
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-signalfx/sdk/v6/go/signalfx/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// SignalFx Azure integrations. For help with this integration see [Monitoring Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure).
//
// > **NOTE** When managing integrations, use a session token of an administrator to authenticate the SignalFx provider. See [Operations that require a session token for an administrator](https://dev.splunk.com/observability/docs/administration/authtokens#Operations-that-require-a-session-token-for-an-administrator). Otherwise you'll receive a 4xx error.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-signalfx/sdk/v6/go/signalfx/azure"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := azure.NewIntegration(ctx, "azureMyteam", &azure.IntegrationArgs{
// AdditionalServices: pulumi.StringArray{
// pulumi.String("some/service"),
// pulumi.String("another/service"),
// },
// AppId: pulumi.String("YYY"),
// CustomNamespacesPerServices: azure.IntegrationCustomNamespacesPerServiceArray{
// &azure.IntegrationCustomNamespacesPerServiceArgs{
// Namespaces: pulumi.StringArray{
// pulumi.String("monitoringAgent"),
// pulumi.String("customNamespace"),
// },
// Service: pulumi.String("Microsoft.Compute/virtualMachines"),
// },
// },
// Enabled: pulumi.Bool(true),
// Environment: pulumi.String("azure"),
// PollRate: pulumi.Int(300),
// ResourceFilterRules: azure.IntegrationResourceFilterRuleArray{
// &azure.IntegrationResourceFilterRuleArgs{
// FilterSource: pulumi.String("filter('azure_tag_service', 'payment') and (filter('azure_tag_env', 'prod-us') or filter('azure_tag_env', 'prod-eu'))"),
// },
// &azure.IntegrationResourceFilterRuleArgs{
// FilterSource: pulumi.String("filter('azure_tag_service', 'notification') and (filter('azure_tag_env', 'prod-us') or filter('azure_tag_env', 'prod-eu'))"),
// },
// },
// SecretKey: pulumi.String("XXX"),
// Services: pulumi.StringArray{
// pulumi.String("microsoft.sql/servers/elasticpools"),
// },
// Subscriptions: pulumi.StringArray{
// pulumi.String("sub-guid-here"),
// },
// TenantId: pulumi.String("ZZZ"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
type Integration struct {
pulumi.CustomResourceState
// Additional Azure resource types that you want to sync with Observability Cloud.
AdditionalServices pulumi.StringArrayOutput `pulumi:"additionalServices"`
// Azure application ID for the SignalFx app. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/getting-started/send-data.html#connect-to-microsoft-azure) in the product documentation.
AppId pulumi.StringOutput `pulumi:"appId"`
// Allows for more fine-grained control of syncing of custom namespaces, should the boolean convenience parameter `syncGuestOsNamespaces` be not enough. The customer may specify a map of services to custom namespaces. If they do so, for each service which is a key in this map, we will attempt to sync metrics from namespaces in the value list in addition to the default namespaces.
CustomNamespacesPerServices IntegrationCustomNamespacesPerServiceArrayOutput `pulumi:"customNamespacesPerServices"`
// Whether the integration is enabled.
Enabled pulumi.BoolOutput `pulumi:"enabled"`
// What type of Azure integration this is. The allowed values are `\"azure_us_government\"` and `\"azure\"`. Defaults to `\"azure\"`.
Environment pulumi.StringPtrOutput `pulumi:"environment"`
// If enabled, SignalFx will sync also Azure Monitor data. If disabled, SignalFx will import only metadata. Defaults to true.
ImportAzureMonitor pulumi.BoolPtrOutput `pulumi:"importAzureMonitor"`
// Name of the integration.
Name pulumi.StringOutput `pulumi:"name"`
// Name of the org token to be used for data ingestion. If not specified then default access token is used.
NamedToken pulumi.StringPtrOutput `pulumi:"namedToken"`
// Azure poll rate (in seconds). Value between `60` and `600`. Default: `300`.
PollRate pulumi.IntPtrOutput `pulumi:"pollRate"`
// List of rules for filtering Azure resources by their tags.
ResourceFilterRules IntegrationResourceFilterRuleArrayOutput `pulumi:"resourceFilterRules"`
// Azure secret key that associates the SignalFx app in Azure with the Azure tenant ID. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
SecretKey pulumi.StringOutput `pulumi:"secretKey"`
// List of Microsoft Azure service names for the Azure services you want SignalFx to monitor. Can be an empty list to import data for all supported services. See [Microsoft Azure services](https://docs.splunk.com/Observability/gdi/get-data-in/integrations.html#azure-integrations) for a list of valid values.
Services pulumi.StringArrayOutput `pulumi:"services"`
// List of Azure subscriptions that SignalFx should monitor.
Subscriptions pulumi.StringArrayOutput `pulumi:"subscriptions"`
// If enabled, SignalFx will try to sync additional namespaces for VMs (including VMs in scale sets): telegraf/mem, telegraf/cpu, azure.vm.windows.guest (these are namespaces recommended by Azure when enabling their Diagnostic Extension). If there are no metrics there, no new datapoints will be ingested. Defaults to false.
SyncGuestOsNamespaces pulumi.BoolPtrOutput `pulumi:"syncGuestOsNamespaces"`
// Azure ID of the Azure tenant. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
TenantId pulumi.StringOutput `pulumi:"tenantId"`
}
// NewIntegration registers a new resource with the given unique name, arguments, and options.
func NewIntegration(ctx *pulumi.Context,
name string, args *IntegrationArgs, opts ...pulumi.ResourceOption) (*Integration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AppId == nil {
return nil, errors.New("invalid value for required argument 'AppId'")
}
if args.Enabled == nil {
return nil, errors.New("invalid value for required argument 'Enabled'")
}
if args.SecretKey == nil {
return nil, errors.New("invalid value for required argument 'SecretKey'")
}
if args.Services == nil {
return nil, errors.New("invalid value for required argument 'Services'")
}
if args.Subscriptions == nil {
return nil, errors.New("invalid value for required argument 'Subscriptions'")
}
if args.TenantId == nil {
return nil, errors.New("invalid value for required argument 'TenantId'")
}
if args.AppId != nil {
args.AppId = pulumi.ToSecret(args.AppId).(pulumi.StringInput)
}
if args.Environment != nil {
args.Environment = pulumi.ToSecret(args.Environment).(pulumi.StringPtrInput)
}
if args.SecretKey != nil {
args.SecretKey = pulumi.ToSecret(args.SecretKey).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"appId",
"environment",
"secretKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Integration
err := ctx.RegisterResource("signalfx:azure/integration:Integration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIntegration gets an existing Integration 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 GetIntegration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IntegrationState, opts ...pulumi.ResourceOption) (*Integration, error) {
var resource Integration
err := ctx.ReadResource("signalfx:azure/integration:Integration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Integration resources.
type integrationState struct {
// Additional Azure resource types that you want to sync with Observability Cloud.
AdditionalServices []string `pulumi:"additionalServices"`
// Azure application ID for the SignalFx app. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/getting-started/send-data.html#connect-to-microsoft-azure) in the product documentation.
AppId *string `pulumi:"appId"`
// Allows for more fine-grained control of syncing of custom namespaces, should the boolean convenience parameter `syncGuestOsNamespaces` be not enough. The customer may specify a map of services to custom namespaces. If they do so, for each service which is a key in this map, we will attempt to sync metrics from namespaces in the value list in addition to the default namespaces.
CustomNamespacesPerServices []IntegrationCustomNamespacesPerService `pulumi:"customNamespacesPerServices"`
// Whether the integration is enabled.
Enabled *bool `pulumi:"enabled"`
// What type of Azure integration this is. The allowed values are `\"azure_us_government\"` and `\"azure\"`. Defaults to `\"azure\"`.
Environment *string `pulumi:"environment"`
// If enabled, SignalFx will sync also Azure Monitor data. If disabled, SignalFx will import only metadata. Defaults to true.
ImportAzureMonitor *bool `pulumi:"importAzureMonitor"`
// Name of the integration.
Name *string `pulumi:"name"`
// Name of the org token to be used for data ingestion. If not specified then default access token is used.
NamedToken *string `pulumi:"namedToken"`
// Azure poll rate (in seconds). Value between `60` and `600`. Default: `300`.
PollRate *int `pulumi:"pollRate"`
// List of rules for filtering Azure resources by their tags.
ResourceFilterRules []IntegrationResourceFilterRule `pulumi:"resourceFilterRules"`
// Azure secret key that associates the SignalFx app in Azure with the Azure tenant ID. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
SecretKey *string `pulumi:"secretKey"`
// List of Microsoft Azure service names for the Azure services you want SignalFx to monitor. Can be an empty list to import data for all supported services. See [Microsoft Azure services](https://docs.splunk.com/Observability/gdi/get-data-in/integrations.html#azure-integrations) for a list of valid values.
Services []string `pulumi:"services"`
// List of Azure subscriptions that SignalFx should monitor.
Subscriptions []string `pulumi:"subscriptions"`
// If enabled, SignalFx will try to sync additional namespaces for VMs (including VMs in scale sets): telegraf/mem, telegraf/cpu, azure.vm.windows.guest (these are namespaces recommended by Azure when enabling their Diagnostic Extension). If there are no metrics there, no new datapoints will be ingested. Defaults to false.
SyncGuestOsNamespaces *bool `pulumi:"syncGuestOsNamespaces"`
// Azure ID of the Azure tenant. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
TenantId *string `pulumi:"tenantId"`
}
type IntegrationState struct {
// Additional Azure resource types that you want to sync with Observability Cloud.
AdditionalServices pulumi.StringArrayInput
// Azure application ID for the SignalFx app. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/getting-started/send-data.html#connect-to-microsoft-azure) in the product documentation.
AppId pulumi.StringPtrInput
// Allows for more fine-grained control of syncing of custom namespaces, should the boolean convenience parameter `syncGuestOsNamespaces` be not enough. The customer may specify a map of services to custom namespaces. If they do so, for each service which is a key in this map, we will attempt to sync metrics from namespaces in the value list in addition to the default namespaces.
CustomNamespacesPerServices IntegrationCustomNamespacesPerServiceArrayInput
// Whether the integration is enabled.
Enabled pulumi.BoolPtrInput
// What type of Azure integration this is. The allowed values are `\"azure_us_government\"` and `\"azure\"`. Defaults to `\"azure\"`.
Environment pulumi.StringPtrInput
// If enabled, SignalFx will sync also Azure Monitor data. If disabled, SignalFx will import only metadata. Defaults to true.
ImportAzureMonitor pulumi.BoolPtrInput
// Name of the integration.
Name pulumi.StringPtrInput
// Name of the org token to be used for data ingestion. If not specified then default access token is used.
NamedToken pulumi.StringPtrInput
// Azure poll rate (in seconds). Value between `60` and `600`. Default: `300`.
PollRate pulumi.IntPtrInput
// List of rules for filtering Azure resources by their tags.
ResourceFilterRules IntegrationResourceFilterRuleArrayInput
// Azure secret key that associates the SignalFx app in Azure with the Azure tenant ID. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
SecretKey pulumi.StringPtrInput
// List of Microsoft Azure service names for the Azure services you want SignalFx to monitor. Can be an empty list to import data for all supported services. See [Microsoft Azure services](https://docs.splunk.com/Observability/gdi/get-data-in/integrations.html#azure-integrations) for a list of valid values.
Services pulumi.StringArrayInput
// List of Azure subscriptions that SignalFx should monitor.
Subscriptions pulumi.StringArrayInput
// If enabled, SignalFx will try to sync additional namespaces for VMs (including VMs in scale sets): telegraf/mem, telegraf/cpu, azure.vm.windows.guest (these are namespaces recommended by Azure when enabling their Diagnostic Extension). If there are no metrics there, no new datapoints will be ingested. Defaults to false.
SyncGuestOsNamespaces pulumi.BoolPtrInput
// Azure ID of the Azure tenant. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
TenantId pulumi.StringPtrInput
}
func (IntegrationState) ElementType() reflect.Type {
return reflect.TypeOf((*integrationState)(nil)).Elem()
}
type integrationArgs struct {
// Additional Azure resource types that you want to sync with Observability Cloud.
AdditionalServices []string `pulumi:"additionalServices"`
// Azure application ID for the SignalFx app. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/getting-started/send-data.html#connect-to-microsoft-azure) in the product documentation.
AppId string `pulumi:"appId"`
// Allows for more fine-grained control of syncing of custom namespaces, should the boolean convenience parameter `syncGuestOsNamespaces` be not enough. The customer may specify a map of services to custom namespaces. If they do so, for each service which is a key in this map, we will attempt to sync metrics from namespaces in the value list in addition to the default namespaces.
CustomNamespacesPerServices []IntegrationCustomNamespacesPerService `pulumi:"customNamespacesPerServices"`
// Whether the integration is enabled.
Enabled bool `pulumi:"enabled"`
// What type of Azure integration this is. The allowed values are `\"azure_us_government\"` and `\"azure\"`. Defaults to `\"azure\"`.
Environment *string `pulumi:"environment"`
// If enabled, SignalFx will sync also Azure Monitor data. If disabled, SignalFx will import only metadata. Defaults to true.
ImportAzureMonitor *bool `pulumi:"importAzureMonitor"`
// Name of the integration.
Name *string `pulumi:"name"`
// Name of the org token to be used for data ingestion. If not specified then default access token is used.
NamedToken *string `pulumi:"namedToken"`
// Azure poll rate (in seconds). Value between `60` and `600`. Default: `300`.
PollRate *int `pulumi:"pollRate"`
// List of rules for filtering Azure resources by their tags.
ResourceFilterRules []IntegrationResourceFilterRule `pulumi:"resourceFilterRules"`
// Azure secret key that associates the SignalFx app in Azure with the Azure tenant ID. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
SecretKey string `pulumi:"secretKey"`
// List of Microsoft Azure service names for the Azure services you want SignalFx to monitor. Can be an empty list to import data for all supported services. See [Microsoft Azure services](https://docs.splunk.com/Observability/gdi/get-data-in/integrations.html#azure-integrations) for a list of valid values.
Services []string `pulumi:"services"`
// List of Azure subscriptions that SignalFx should monitor.
Subscriptions []string `pulumi:"subscriptions"`
// If enabled, SignalFx will try to sync additional namespaces for VMs (including VMs in scale sets): telegraf/mem, telegraf/cpu, azure.vm.windows.guest (these are namespaces recommended by Azure when enabling their Diagnostic Extension). If there are no metrics there, no new datapoints will be ingested. Defaults to false.
SyncGuestOsNamespaces *bool `pulumi:"syncGuestOsNamespaces"`
// Azure ID of the Azure tenant. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
TenantId string `pulumi:"tenantId"`
}
// The set of arguments for constructing a Integration resource.
type IntegrationArgs struct {
// Additional Azure resource types that you want to sync with Observability Cloud.
AdditionalServices pulumi.StringArrayInput
// Azure application ID for the SignalFx app. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/getting-started/send-data.html#connect-to-microsoft-azure) in the product documentation.
AppId pulumi.StringInput
// Allows for more fine-grained control of syncing of custom namespaces, should the boolean convenience parameter `syncGuestOsNamespaces` be not enough. The customer may specify a map of services to custom namespaces. If they do so, for each service which is a key in this map, we will attempt to sync metrics from namespaces in the value list in addition to the default namespaces.
CustomNamespacesPerServices IntegrationCustomNamespacesPerServiceArrayInput
// Whether the integration is enabled.
Enabled pulumi.BoolInput
// What type of Azure integration this is. The allowed values are `\"azure_us_government\"` and `\"azure\"`. Defaults to `\"azure\"`.
Environment pulumi.StringPtrInput
// If enabled, SignalFx will sync also Azure Monitor data. If disabled, SignalFx will import only metadata. Defaults to true.
ImportAzureMonitor pulumi.BoolPtrInput
// Name of the integration.
Name pulumi.StringPtrInput
// Name of the org token to be used for data ingestion. If not specified then default access token is used.
NamedToken pulumi.StringPtrInput
// Azure poll rate (in seconds). Value between `60` and `600`. Default: `300`.
PollRate pulumi.IntPtrInput
// List of rules for filtering Azure resources by their tags.
ResourceFilterRules IntegrationResourceFilterRuleArrayInput
// Azure secret key that associates the SignalFx app in Azure with the Azure tenant ID. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
SecretKey pulumi.StringInput
// List of Microsoft Azure service names for the Azure services you want SignalFx to monitor. Can be an empty list to import data for all supported services. See [Microsoft Azure services](https://docs.splunk.com/Observability/gdi/get-data-in/integrations.html#azure-integrations) for a list of valid values.
Services pulumi.StringArrayInput
// List of Azure subscriptions that SignalFx should monitor.
Subscriptions pulumi.StringArrayInput
// If enabled, SignalFx will try to sync additional namespaces for VMs (including VMs in scale sets): telegraf/mem, telegraf/cpu, azure.vm.windows.guest (these are namespaces recommended by Azure when enabling their Diagnostic Extension). If there are no metrics there, no new datapoints will be ingested. Defaults to false.
SyncGuestOsNamespaces pulumi.BoolPtrInput
// Azure ID of the Azure tenant. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
TenantId pulumi.StringInput
}
func (IntegrationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*integrationArgs)(nil)).Elem()
}
type IntegrationInput interface {
pulumi.Input
ToIntegrationOutput() IntegrationOutput
ToIntegrationOutputWithContext(ctx context.Context) IntegrationOutput
}
func (*Integration) ElementType() reflect.Type {
return reflect.TypeOf((**Integration)(nil)).Elem()
}
func (i *Integration) ToIntegrationOutput() IntegrationOutput {
return i.ToIntegrationOutputWithContext(context.Background())
}
func (i *Integration) ToIntegrationOutputWithContext(ctx context.Context) IntegrationOutput {
return pulumi.ToOutputWithContext(ctx, i).(IntegrationOutput)
}
// IntegrationArrayInput is an input type that accepts IntegrationArray and IntegrationArrayOutput values.
// You can construct a concrete instance of `IntegrationArrayInput` via:
//
// IntegrationArray{ IntegrationArgs{...} }
type IntegrationArrayInput interface {
pulumi.Input
ToIntegrationArrayOutput() IntegrationArrayOutput
ToIntegrationArrayOutputWithContext(context.Context) IntegrationArrayOutput
}
type IntegrationArray []IntegrationInput
func (IntegrationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Integration)(nil)).Elem()
}
func (i IntegrationArray) ToIntegrationArrayOutput() IntegrationArrayOutput {
return i.ToIntegrationArrayOutputWithContext(context.Background())
}
func (i IntegrationArray) ToIntegrationArrayOutputWithContext(ctx context.Context) IntegrationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IntegrationArrayOutput)
}
// IntegrationMapInput is an input type that accepts IntegrationMap and IntegrationMapOutput values.
// You can construct a concrete instance of `IntegrationMapInput` via:
//
// IntegrationMap{ "key": IntegrationArgs{...} }
type IntegrationMapInput interface {
pulumi.Input
ToIntegrationMapOutput() IntegrationMapOutput
ToIntegrationMapOutputWithContext(context.Context) IntegrationMapOutput
}
type IntegrationMap map[string]IntegrationInput
func (IntegrationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Integration)(nil)).Elem()
}
func (i IntegrationMap) ToIntegrationMapOutput() IntegrationMapOutput {
return i.ToIntegrationMapOutputWithContext(context.Background())
}
func (i IntegrationMap) ToIntegrationMapOutputWithContext(ctx context.Context) IntegrationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IntegrationMapOutput)
}
type IntegrationOutput struct{ *pulumi.OutputState }
func (IntegrationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Integration)(nil)).Elem()
}
func (o IntegrationOutput) ToIntegrationOutput() IntegrationOutput {
return o
}
func (o IntegrationOutput) ToIntegrationOutputWithContext(ctx context.Context) IntegrationOutput {
return o
}
// Additional Azure resource types that you want to sync with Observability Cloud.
func (o IntegrationOutput) AdditionalServices() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Integration) pulumi.StringArrayOutput { return v.AdditionalServices }).(pulumi.StringArrayOutput)
}
// Azure application ID for the SignalFx app. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/getting-started/send-data.html#connect-to-microsoft-azure) in the product documentation.
func (o IntegrationOutput) AppId() pulumi.StringOutput {
return o.ApplyT(func(v *Integration) pulumi.StringOutput { return v.AppId }).(pulumi.StringOutput)
}
// Allows for more fine-grained control of syncing of custom namespaces, should the boolean convenience parameter `syncGuestOsNamespaces` be not enough. The customer may specify a map of services to custom namespaces. If they do so, for each service which is a key in this map, we will attempt to sync metrics from namespaces in the value list in addition to the default namespaces.
func (o IntegrationOutput) CustomNamespacesPerServices() IntegrationCustomNamespacesPerServiceArrayOutput {
return o.ApplyT(func(v *Integration) IntegrationCustomNamespacesPerServiceArrayOutput {
return v.CustomNamespacesPerServices
}).(IntegrationCustomNamespacesPerServiceArrayOutput)
}
// Whether the integration is enabled.
func (o IntegrationOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v *Integration) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput)
}
// What type of Azure integration this is. The allowed values are `\"azure_us_government\"` and `\"azure\"`. Defaults to `\"azure\"`.
func (o IntegrationOutput) Environment() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Integration) pulumi.StringPtrOutput { return v.Environment }).(pulumi.StringPtrOutput)
}
// If enabled, SignalFx will sync also Azure Monitor data. If disabled, SignalFx will import only metadata. Defaults to true.
func (o IntegrationOutput) ImportAzureMonitor() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Integration) pulumi.BoolPtrOutput { return v.ImportAzureMonitor }).(pulumi.BoolPtrOutput)
}
// Name of the integration.
func (o IntegrationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Integration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Name of the org token to be used for data ingestion. If not specified then default access token is used.
func (o IntegrationOutput) NamedToken() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Integration) pulumi.StringPtrOutput { return v.NamedToken }).(pulumi.StringPtrOutput)
}
// Azure poll rate (in seconds). Value between `60` and `600`. Default: `300`.
func (o IntegrationOutput) PollRate() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Integration) pulumi.IntPtrOutput { return v.PollRate }).(pulumi.IntPtrOutput)
}
// List of rules for filtering Azure resources by their tags.
func (o IntegrationOutput) ResourceFilterRules() IntegrationResourceFilterRuleArrayOutput {
return o.ApplyT(func(v *Integration) IntegrationResourceFilterRuleArrayOutput { return v.ResourceFilterRules }).(IntegrationResourceFilterRuleArrayOutput)
}
// Azure secret key that associates the SignalFx app in Azure with the Azure tenant ID. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
func (o IntegrationOutput) SecretKey() pulumi.StringOutput {
return o.ApplyT(func(v *Integration) pulumi.StringOutput { return v.SecretKey }).(pulumi.StringOutput)
}
// List of Microsoft Azure service names for the Azure services you want SignalFx to monitor. Can be an empty list to import data for all supported services. See [Microsoft Azure services](https://docs.splunk.com/Observability/gdi/get-data-in/integrations.html#azure-integrations) for a list of valid values.
func (o IntegrationOutput) Services() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Integration) pulumi.StringArrayOutput { return v.Services }).(pulumi.StringArrayOutput)
}
// List of Azure subscriptions that SignalFx should monitor.
func (o IntegrationOutput) Subscriptions() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Integration) pulumi.StringArrayOutput { return v.Subscriptions }).(pulumi.StringArrayOutput)
}
// If enabled, SignalFx will try to sync additional namespaces for VMs (including VMs in scale sets): telegraf/mem, telegraf/cpu, azure.vm.windows.guest (these are namespaces recommended by Azure when enabling their Diagnostic Extension). If there are no metrics there, no new datapoints will be ingested. Defaults to false.
func (o IntegrationOutput) SyncGuestOsNamespaces() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Integration) pulumi.BoolPtrOutput { return v.SyncGuestOsNamespaces }).(pulumi.BoolPtrOutput)
}
// Azure ID of the Azure tenant. To learn how to get this ID, see the topic [Connect to Microsoft Azure](https://docs.signalfx.com/en/latest/integrations/azure-info.html#connect-to-azure) in the product documentation.
func (o IntegrationOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v *Integration) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput)
}
type IntegrationArrayOutput struct{ *pulumi.OutputState }
func (IntegrationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Integration)(nil)).Elem()
}
func (o IntegrationArrayOutput) ToIntegrationArrayOutput() IntegrationArrayOutput {
return o
}
func (o IntegrationArrayOutput) ToIntegrationArrayOutputWithContext(ctx context.Context) IntegrationArrayOutput {
return o
}
func (o IntegrationArrayOutput) Index(i pulumi.IntInput) IntegrationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Integration {
return vs[0].([]*Integration)[vs[1].(int)]
}).(IntegrationOutput)
}
type IntegrationMapOutput struct{ *pulumi.OutputState }
func (IntegrationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Integration)(nil)).Elem()
}
func (o IntegrationMapOutput) ToIntegrationMapOutput() IntegrationMapOutput {
return o
}
func (o IntegrationMapOutput) ToIntegrationMapOutputWithContext(ctx context.Context) IntegrationMapOutput {
return o
}
func (o IntegrationMapOutput) MapIndex(k pulumi.StringInput) IntegrationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Integration {
return vs[0].(map[string]*Integration)[vs[1].(string)]
}).(IntegrationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IntegrationInput)(nil)).Elem(), &Integration{})
pulumi.RegisterInputType(reflect.TypeOf((*IntegrationArrayInput)(nil)).Elem(), IntegrationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IntegrationMapInput)(nil)).Elem(), IntegrationMap{})
pulumi.RegisterOutputType(IntegrationOutput{})
pulumi.RegisterOutputType(IntegrationArrayOutput{})
pulumi.RegisterOutputType(IntegrationMapOutput{})
}