@pulumiverse/grafana 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/annotation.d.ts +28 -3
- package/annotation.js +25 -0
- package/annotation.js.map +1 -1
- package/apiKey.d.ts +18 -0
- package/apiKey.js +18 -0
- package/apiKey.js.map +1 -1
- package/cloudAccessPolicy.d.ts +57 -15
- package/cloudAccessPolicy.js +51 -0
- package/cloudAccessPolicy.js.map +1 -1
- package/cloudAccessPolicyToken.d.ts +54 -9
- package/cloudAccessPolicyToken.js +51 -0
- package/cloudAccessPolicyToken.js.map +1 -1
- package/cloudApiKey.d.ts +35 -6
- package/cloudApiKey.js +32 -0
- package/cloudApiKey.js.map +1 -1
- package/cloudOrgMember.d.ts +9 -0
- package/cloudOrgMember.js +9 -0
- package/cloudOrgMember.js.map +1 -1
- package/cloudPluginInstallation.d.ts +32 -0
- package/cloudPluginInstallation.js +32 -0
- package/cloudPluginInstallation.js.map +1 -1
- package/cloudStack.d.ts +49 -38
- package/cloudStack.js +30 -0
- package/cloudStack.js.map +1 -1
- package/cloudStackServiceAccount.d.ts +36 -3
- package/cloudStackServiceAccount.js +33 -0
- package/cloudStackServiceAccount.js.map +1 -1
- package/cloudStackServiceAccountToken.d.ts +28 -0
- package/cloudStackServiceAccountToken.js +28 -0
- package/cloudStackServiceAccountToken.js.map +1 -1
- package/contactPoint.d.ts +44 -9
- package/contactPoint.js +38 -0
- package/contactPoint.js.map +1 -1
- package/dashboard.d.ts +44 -16
- package/dashboard.js +37 -0
- package/dashboard.js.map +1 -1
- package/dashboardPermission.d.ts +55 -3
- package/dashboardPermission.js +52 -0
- package/dashboardPermission.js.map +1 -1
- package/dashboardPermissionItem.d.ts +48 -0
- package/dashboardPermissionItem.js +48 -0
- package/dashboardPermissionItem.js.map +1 -1
- package/dashboardPublic.d.ts +73 -12
- package/dashboardPublic.js +67 -0
- package/dashboardPublic.js.map +1 -1
- package/dataSource.d.ts +102 -36
- package/dataSource.js +78 -0
- package/dataSource.js.map +1 -1
- package/dataSourceConfig.d.ts +69 -18
- package/dataSourceConfig.js +63 -0
- package/dataSourceConfig.js.map +1 -1
- package/dataSourcePermission.d.ts +66 -3
- package/dataSourcePermission.js +63 -0
- package/dataSourcePermission.js.map +1 -1
- package/dataSourcePermissionItem.d.ts +61 -0
- package/dataSourcePermissionItem.js +61 -0
- package/dataSourcePermissionItem.js.map +1 -1
- package/folder.d.ts +43 -9
- package/folder.js +37 -0
- package/folder.js.map +1 -1
- package/folderPermission.d.ts +49 -0
- package/folderPermission.js +49 -0
- package/folderPermission.js.map +1 -1
- package/folderPermissionItem.d.ts +47 -0
- package/folderPermissionItem.js +47 -0
- package/folderPermissionItem.js.map +1 -1
- package/getCloudIps.d.ts +43 -0
- package/getCloudIps.js +28 -0
- package/getCloudIps.js.map +1 -1
- package/getCloudOrganization.d.ts +37 -0
- package/getCloudOrganization.js +28 -0
- package/getCloudOrganization.js.map +1 -1
- package/getCloudStack.d.ts +84 -0
- package/getCloudStack.js +6 -0
- package/getCloudStack.js.map +1 -1
- package/getDashboard.d.ts +114 -0
- package/getDashboard.js +64 -0
- package/getDashboard.js.map +1 -1
- package/getDashboards.d.ts +56 -0
- package/getDashboards.js +14 -0
- package/getDashboards.js.map +1 -1
- package/getDataSource.d.ts +118 -0
- package/getDataSource.js +76 -0
- package/getDataSource.js.map +1 -1
- package/getFolder.d.ts +71 -0
- package/getFolder.js +44 -0
- package/getFolder.js.map +1 -1
- package/getFolders.d.ts +60 -0
- package/getFolders.js +48 -0
- package/getFolders.js.map +1 -1
- package/getLibraryPanel.d.ts +65 -0
- package/getLibraryPanel.js +6 -0
- package/getLibraryPanel.js.map +1 -1
- package/getOnCallSlackChannel.d.ts +44 -0
- package/getOnCallSlackChannel.js +32 -0
- package/getOnCallSlackChannel.js.map +1 -1
- package/getOncallAction.d.ts +21 -0
- package/getOncallAction.js +12 -0
- package/getOncallAction.js.map +1 -1
- package/getOncallEscalationChain.d.ts +41 -0
- package/getOncallEscalationChain.js +32 -0
- package/getOncallEscalationChain.js.map +1 -1
- package/getOncallIntegration.d.ts +44 -0
- package/getOncallIntegration.js +32 -0
- package/getOncallIntegration.js.map +1 -1
- package/getOncallOutgoingWebhook.d.ts +41 -0
- package/getOncallOutgoingWebhook.js +32 -0
- package/getOncallOutgoingWebhook.js.map +1 -1
- package/getOncallSchedule.d.ts +46 -0
- package/getOncallSchedule.js +34 -0
- package/getOncallSchedule.js.map +1 -1
- package/getOncallTeam.d.ts +37 -0
- package/getOncallTeam.js +28 -0
- package/getOncallTeam.js.map +1 -1
- package/getOncallUser.d.ts +47 -0
- package/getOncallUser.js +32 -0
- package/getOncallUser.js.map +1 -1
- package/getOncallUserGroup.d.ts +32 -0
- package/getOncallUserGroup.js +32 -0
- package/getOncallUserGroup.js.map +1 -1
- package/getOrganization.d.ts +70 -0
- package/getOrganization.js +52 -0
- package/getOrganization.js.map +1 -1
- package/getOrganizationPreferences.d.ts +53 -0
- package/getOrganizationPreferences.js +30 -0
- package/getOrganizationPreferences.js.map +1 -1
- package/getRole.d.ts +118 -0
- package/getRole.js +82 -0
- package/getRole.js.map +1 -1
- package/getServiceAccount.d.ts +32 -0
- package/getServiceAccount.js +8 -0
- package/getServiceAccount.js.map +1 -1
- package/getSlos.d.ts +17 -0
- package/getSlos.js +14 -0
- package/getSlos.js.map +1 -1
- package/getSyntheticMonitoringProbe.d.ts +62 -0
- package/getSyntheticMonitoringProbe.js +32 -0
- package/getSyntheticMonitoringProbe.js.map +1 -1
- package/getSyntheticMonitoringProbes.d.ts +40 -0
- package/getSyntheticMonitoringProbes.js +28 -0
- package/getSyntheticMonitoringProbes.js.map +1 -1
- package/getTeam.d.ts +50 -0
- package/getTeam.js +50 -0
- package/getTeam.js.map +1 -1
- package/getUser.d.ts +99 -0
- package/getUser.js +66 -0
- package/getUser.js.map +1 -1
- package/getUsers.d.ts +51 -0
- package/getUsers.js +48 -0
- package/getUsers.js.map +1 -1
- package/libraryPanel.d.ts +43 -12
- package/libraryPanel.js +37 -0
- package/libraryPanel.js.map +1 -1
- package/machineLearningHoliday.d.ts +14 -3
- package/machineLearningHoliday.js +11 -0
- package/machineLearningHoliday.js.map +1 -1
- package/machineLearningJob.d.ts +18 -12
- package/machineLearningJob.js +9 -0
- package/machineLearningJob.js.map +1 -1
- package/machineLearningOutlierDetector.d.ts +22 -12
- package/machineLearningOutlierDetector.js +13 -0
- package/machineLearningOutlierDetector.js.map +1 -1
- package/messageTemplate.d.ts +32 -0
- package/messageTemplate.js +32 -0
- package/messageTemplate.js.map +1 -1
- package/muteTiming.d.ts +51 -0
- package/muteTiming.js +51 -0
- package/muteTiming.js.map +1 -1
- package/notificationPolicy.d.ts +98 -9
- package/notificationPolicy.js +92 -0
- package/notificationPolicy.js.map +1 -1
- package/oncallEscalation.d.ts +81 -41
- package/oncallEscalation.js +52 -0
- package/oncallEscalation.js.map +1 -1
- package/oncallEscalationChain.d.ts +25 -6
- package/oncallEscalationChain.js +22 -0
- package/oncallEscalationChain.js.map +1 -1
- package/oncallIntegration.d.ts +16 -15
- package/oncallIntegration.js +10 -0
- package/oncallIntegration.js.map +1 -1
- package/oncallOnCallShift.d.ts +30 -27
- package/oncallOnCallShift.js +9 -0
- package/oncallOnCallShift.js.map +1 -1
- package/oncallOutgoingWebhook.d.ts +34 -21
- package/oncallOutgoingWebhook.js +22 -0
- package/oncallOutgoingWebhook.js.map +1 -1
- package/oncallRoute.d.ts +49 -3
- package/oncallRoute.js +46 -0
- package/oncallRoute.js.map +1 -1
- package/oncallSchedule.d.ts +49 -9
- package/oncallSchedule.js +43 -0
- package/oncallSchedule.js.map +1 -1
- package/organization.d.ts +94 -39
- package/organization.js +37 -0
- package/organization.js.map +1 -1
- package/organizationPreference.d.ts +31 -9
- package/organizationPreference.js +25 -0
- package/organizationPreference.js.map +1 -1
- package/package.json +2 -2
- package/package.json.dev +1 -1
- package/playlist.d.ts +41 -0
- package/playlist.js +41 -0
- package/playlist.js.map +1 -1
- package/report.d.ts +56 -15
- package/report.js +41 -0
- package/report.js.map +1 -1
- package/role.d.ts +58 -15
- package/role.js +46 -0
- package/role.js.map +1 -1
- package/roleAssignment.d.ts +48 -0
- package/roleAssignment.js +48 -0
- package/roleAssignment.js.map +1 -1
- package/roleAssignmentItem.d.ts +51 -0
- package/roleAssignmentItem.js +51 -0
- package/roleAssignmentItem.js.map +1 -1
- package/ruleGroup.d.ts +117 -9
- package/ruleGroup.js +111 -0
- package/ruleGroup.js.map +1 -1
- package/serviceAccount.d.ts +33 -3
- package/serviceAccount.js +30 -0
- package/serviceAccount.js.map +1 -1
- package/serviceAccountPermission.d.ts +50 -0
- package/serviceAccountPermission.js +50 -0
- package/serviceAccountPermission.js.map +1 -1
- package/serviceAccountPermissionItem.d.ts +44 -0
- package/serviceAccountPermissionItem.js +44 -0
- package/serviceAccountPermissionItem.js.map +1 -1
- package/serviceAccountToken.d.ts +27 -9
- package/serviceAccountToken.js +24 -0
- package/serviceAccountToken.js.map +1 -1
- package/slo.d.ts +39 -27
- package/slo.js +15 -0
- package/slo.js.map +1 -1
- package/ssoSettings.d.ts +75 -3
- package/ssoSettings.js +72 -0
- package/ssoSettings.js.map +1 -1
- package/syntheticMonitoringCheck.d.ts +431 -36
- package/syntheticMonitoringCheck.js +413 -0
- package/syntheticMonitoringCheck.js.map +1 -1
- package/syntheticMonitoringInstallation.d.ts +75 -24
- package/syntheticMonitoringInstallation.js +69 -0
- package/syntheticMonitoringInstallation.js.map +1 -1
- package/syntheticMonitoringProbe.d.ts +39 -6
- package/syntheticMonitoringProbe.js +36 -0
- package/syntheticMonitoringProbe.js.map +1 -1
- package/team.d.ts +33 -0
- package/team.js +33 -0
- package/team.js.map +1 -1
- package/teamExternalGroup.d.ts +31 -0
- package/teamExternalGroup.js +31 -0
- package/teamExternalGroup.js.map +1 -1
- package/types/input.d.ts +123 -123
- package/types/output.d.ts +123 -123
- package/user.d.ts +33 -3
- package/user.js +30 -0
- package/user.js.map +1 -1
package/dataSourceConfig.d.ts
CHANGED
|
@@ -1,4 +1,67 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/datasources/)
|
|
4
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/data_source/)
|
|
5
|
+
*
|
|
6
|
+
* The required arguments for this resource vary depending on the type of data
|
|
7
|
+
* source selected (via the 'type' argument).
|
|
8
|
+
*
|
|
9
|
+
* Use this resource for configuring multiple datasources, when that configuration (`jsonDataEncoded` field) requires circular references like in the example below.
|
|
10
|
+
*
|
|
11
|
+
* > When using the `grafana.DataSourceConfig` resource, the corresponding `grafana.DataSource` resources must have the `jsonDataEncoded` and `httpHeaders` fields ignored. Otherwise, an infinite update loop will occur. See the example below.
|
|
12
|
+
*
|
|
13
|
+
* ## Example Usage
|
|
14
|
+
*
|
|
15
|
+
* <!--Start PulumiCodeChooser -->
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
19
|
+
*
|
|
20
|
+
* const lokiDataSource = new grafana.DataSource("lokiDataSource", {
|
|
21
|
+
* type: "loki",
|
|
22
|
+
* url: "http://localhost:3100",
|
|
23
|
+
* });
|
|
24
|
+
* const tempoDataSource = new grafana.DataSource("tempoDataSource", {
|
|
25
|
+
* type: "tempo",
|
|
26
|
+
* url: "http://localhost:3200",
|
|
27
|
+
* });
|
|
28
|
+
* const lokiDataSourceConfig = new grafana.DataSourceConfig("lokiDataSourceConfig", {
|
|
29
|
+
* uid: lokiDataSource.uid,
|
|
30
|
+
* jsonDataEncoded: pulumi.jsonStringify({
|
|
31
|
+
* derivedFields: [{
|
|
32
|
+
* datasourceUid: tempoDataSource.uid,
|
|
33
|
+
* matcherRegex: "[tT]race_?[iI][dD]\"?[:=]\"?(\\w+)",
|
|
34
|
+
* matcherType: "regex",
|
|
35
|
+
* name: "traceID",
|
|
36
|
+
* url: "${__value.raw}",
|
|
37
|
+
* }],
|
|
38
|
+
* }),
|
|
39
|
+
* });
|
|
40
|
+
* const tempoDataSourceConfig = new grafana.DataSourceConfig("tempoDataSourceConfig", {
|
|
41
|
+
* uid: tempoDataSource.uid,
|
|
42
|
+
* jsonDataEncoded: pulumi.jsonStringify({
|
|
43
|
+
* tracesToLogsV2: {
|
|
44
|
+
* customQuery: true,
|
|
45
|
+
* datasourceUid: lokiDataSource.uid,
|
|
46
|
+
* filterBySpanID: false,
|
|
47
|
+
* filterByTraceID: false,
|
|
48
|
+
* query: "|=\"${__trace.traceId}\" | json",
|
|
49
|
+
* },
|
|
50
|
+
* }),
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
* <!--End PulumiCodeChooser -->
|
|
54
|
+
*
|
|
55
|
+
* ## Import
|
|
56
|
+
*
|
|
57
|
+
* ```sh
|
|
58
|
+
* $ pulumi import grafana:index/dataSourceConfig:DataSourceConfig name "{{ uid }}"
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* ```sh
|
|
62
|
+
* $ pulumi import grafana:index/dataSourceConfig:DataSourceConfig name "{{ orgID }}:{{ uid }}"
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
2
65
|
export declare class DataSourceConfig extends pulumi.CustomResource {
|
|
3
66
|
/**
|
|
4
67
|
* Get an existing DataSourceConfig resource's state with the given name, ID, and optional extra
|
|
@@ -22,9 +85,7 @@ export declare class DataSourceConfig extends pulumi.CustomResource {
|
|
|
22
85
|
[key: string]: string;
|
|
23
86
|
} | undefined>;
|
|
24
87
|
/**
|
|
25
|
-
* Serialized JSON string containing the json data. This attribute can be used to pass configuration options to the data
|
|
26
|
-
* source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it
|
|
27
|
-
* from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
88
|
+
* Serialized JSON string containing the json data. This attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
28
89
|
*/
|
|
29
90
|
readonly jsonDataEncoded: pulumi.Output<string | undefined>;
|
|
30
91
|
/**
|
|
@@ -32,9 +93,7 @@ export declare class DataSourceConfig extends pulumi.CustomResource {
|
|
|
32
93
|
*/
|
|
33
94
|
readonly orgId: pulumi.Output<string | undefined>;
|
|
34
95
|
/**
|
|
35
|
-
* Serialized JSON string containing the secure json data. This attribute can be used to pass secure configuration options
|
|
36
|
-
* to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when
|
|
37
|
-
* saving it from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
96
|
+
* Serialized JSON string containing the secure json data. This attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
38
97
|
*/
|
|
39
98
|
readonly secureJsonDataEncoded: pulumi.Output<string | undefined>;
|
|
40
99
|
/**
|
|
@@ -61,9 +120,7 @@ export interface DataSourceConfigState {
|
|
|
61
120
|
[key: string]: pulumi.Input<string>;
|
|
62
121
|
}>;
|
|
63
122
|
/**
|
|
64
|
-
* Serialized JSON string containing the json data. This attribute can be used to pass configuration options to the data
|
|
65
|
-
* source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it
|
|
66
|
-
* from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
123
|
+
* Serialized JSON string containing the json data. This attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
67
124
|
*/
|
|
68
125
|
jsonDataEncoded?: pulumi.Input<string>;
|
|
69
126
|
/**
|
|
@@ -71,9 +128,7 @@ export interface DataSourceConfigState {
|
|
|
71
128
|
*/
|
|
72
129
|
orgId?: pulumi.Input<string>;
|
|
73
130
|
/**
|
|
74
|
-
* Serialized JSON string containing the secure json data. This attribute can be used to pass secure configuration options
|
|
75
|
-
* to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when
|
|
76
|
-
* saving it from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
131
|
+
* Serialized JSON string containing the secure json data. This attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
77
132
|
*/
|
|
78
133
|
secureJsonDataEncoded?: pulumi.Input<string>;
|
|
79
134
|
/**
|
|
@@ -92,9 +147,7 @@ export interface DataSourceConfigArgs {
|
|
|
92
147
|
[key: string]: pulumi.Input<string>;
|
|
93
148
|
}>;
|
|
94
149
|
/**
|
|
95
|
-
* Serialized JSON string containing the json data. This attribute can be used to pass configuration options to the data
|
|
96
|
-
* source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it
|
|
97
|
-
* from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
150
|
+
* Serialized JSON string containing the json data. This attribute can be used to pass configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
98
151
|
*/
|
|
99
152
|
jsonDataEncoded?: pulumi.Input<string>;
|
|
100
153
|
/**
|
|
@@ -102,9 +155,7 @@ export interface DataSourceConfigArgs {
|
|
|
102
155
|
*/
|
|
103
156
|
orgId?: pulumi.Input<string>;
|
|
104
157
|
/**
|
|
105
|
-
* Serialized JSON string containing the secure json data. This attribute can be used to pass secure configuration options
|
|
106
|
-
* to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when
|
|
107
|
-
* saving it from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
158
|
+
* Serialized JSON string containing the secure json data. This attribute can be used to pass secure configuration options to the data source. To figure out what options a datasource has available, see its docs or inspect the network data when saving it from the Grafana UI. Note that keys in this map are usually camelCased.
|
|
108
159
|
*/
|
|
109
160
|
secureJsonDataEncoded?: pulumi.Input<string>;
|
|
110
161
|
/**
|
package/dataSourceConfig.js
CHANGED
|
@@ -5,6 +5,69 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.DataSourceConfig = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/datasources/)
|
|
10
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/data_source/)
|
|
11
|
+
*
|
|
12
|
+
* The required arguments for this resource vary depending on the type of data
|
|
13
|
+
* source selected (via the 'type' argument).
|
|
14
|
+
*
|
|
15
|
+
* Use this resource for configuring multiple datasources, when that configuration (`jsonDataEncoded` field) requires circular references like in the example below.
|
|
16
|
+
*
|
|
17
|
+
* > When using the `grafana.DataSourceConfig` resource, the corresponding `grafana.DataSource` resources must have the `jsonDataEncoded` and `httpHeaders` fields ignored. Otherwise, an infinite update loop will occur. See the example below.
|
|
18
|
+
*
|
|
19
|
+
* ## Example Usage
|
|
20
|
+
*
|
|
21
|
+
* <!--Start PulumiCodeChooser -->
|
|
22
|
+
* ```typescript
|
|
23
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
24
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
25
|
+
*
|
|
26
|
+
* const lokiDataSource = new grafana.DataSource("lokiDataSource", {
|
|
27
|
+
* type: "loki",
|
|
28
|
+
* url: "http://localhost:3100",
|
|
29
|
+
* });
|
|
30
|
+
* const tempoDataSource = new grafana.DataSource("tempoDataSource", {
|
|
31
|
+
* type: "tempo",
|
|
32
|
+
* url: "http://localhost:3200",
|
|
33
|
+
* });
|
|
34
|
+
* const lokiDataSourceConfig = new grafana.DataSourceConfig("lokiDataSourceConfig", {
|
|
35
|
+
* uid: lokiDataSource.uid,
|
|
36
|
+
* jsonDataEncoded: pulumi.jsonStringify({
|
|
37
|
+
* derivedFields: [{
|
|
38
|
+
* datasourceUid: tempoDataSource.uid,
|
|
39
|
+
* matcherRegex: "[tT]race_?[iI][dD]\"?[:=]\"?(\\w+)",
|
|
40
|
+
* matcherType: "regex",
|
|
41
|
+
* name: "traceID",
|
|
42
|
+
* url: "${__value.raw}",
|
|
43
|
+
* }],
|
|
44
|
+
* }),
|
|
45
|
+
* });
|
|
46
|
+
* const tempoDataSourceConfig = new grafana.DataSourceConfig("tempoDataSourceConfig", {
|
|
47
|
+
* uid: tempoDataSource.uid,
|
|
48
|
+
* jsonDataEncoded: pulumi.jsonStringify({
|
|
49
|
+
* tracesToLogsV2: {
|
|
50
|
+
* customQuery: true,
|
|
51
|
+
* datasourceUid: lokiDataSource.uid,
|
|
52
|
+
* filterBySpanID: false,
|
|
53
|
+
* filterByTraceID: false,
|
|
54
|
+
* query: "|=\"${__trace.traceId}\" | json",
|
|
55
|
+
* },
|
|
56
|
+
* }),
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
* <!--End PulumiCodeChooser -->
|
|
60
|
+
*
|
|
61
|
+
* ## Import
|
|
62
|
+
*
|
|
63
|
+
* ```sh
|
|
64
|
+
* $ pulumi import grafana:index/dataSourceConfig:DataSourceConfig name "{{ uid }}"
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* ```sh
|
|
68
|
+
* $ pulumi import grafana:index/dataSourceConfig:DataSourceConfig name "{{ orgID }}:{{ uid }}"
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
8
71
|
class DataSourceConfig extends pulumi.CustomResource {
|
|
9
72
|
/**
|
|
10
73
|
* Get an existing DataSourceConfig resource's state with the given name, ID, and optional extra
|
package/dataSourceConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSourceConfig.js","sourceRoot":"","sources":["../dataSourceConfig.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,gBAAiB,SAAQ,MAAM,CAAC,cAAc;IACvD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC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C,CAAC,SAAS,CAAC;YAC9H,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;SACvD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,aAAa,EAAE,uBAAuB,CAAC,EAAE,CAAC;QACzF,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACrE,CAAC;;AA/EL,4CAgFC;AAlEG,gBAAgB;AACO,6BAAY,GAAG,iDAAiD,CAAC"}
|
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
import * as inputs from "./types/input";
|
|
3
3
|
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Manages the entire set of permissions for a datasource. Permissions that aren't specified when applying this resource will be removed.
|
|
6
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/datasource_permissions/)
|
|
7
|
+
*
|
|
8
|
+
* ## Example Usage
|
|
9
|
+
*
|
|
10
|
+
* <!--Start PulumiCodeChooser -->
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
14
|
+
*
|
|
15
|
+
* const team = new grafana.Team("team", {});
|
|
16
|
+
* const foo = new grafana.DataSource("foo", {
|
|
17
|
+
* type: "cloudwatch",
|
|
18
|
+
* jsonDataEncoded: JSON.stringify({
|
|
19
|
+
* defaultRegion: "us-east-1",
|
|
20
|
+
* authType: "keys",
|
|
21
|
+
* }),
|
|
22
|
+
* secureJsonDataEncoded: JSON.stringify({
|
|
23
|
+
* accessKey: "123",
|
|
24
|
+
* secretKey: "456",
|
|
25
|
+
* }),
|
|
26
|
+
* });
|
|
27
|
+
* const user = new grafana.User("user", {
|
|
28
|
+
* email: "test-ds-permissions@example.com",
|
|
29
|
+
* login: "test-ds-permissions",
|
|
30
|
+
* password: "hunter2",
|
|
31
|
+
* });
|
|
32
|
+
* const sa = new grafana.ServiceAccount("sa", {role: "Viewer"});
|
|
33
|
+
* const fooPermissions = new grafana.DataSourcePermission("fooPermissions", {
|
|
34
|
+
* datasourceUid: foo.uid,
|
|
35
|
+
* permissions: [
|
|
36
|
+
* {
|
|
37
|
+
* teamId: team.id,
|
|
38
|
+
* permission: "Edit",
|
|
39
|
+
* },
|
|
40
|
+
* {
|
|
41
|
+
* userId: user.id,
|
|
42
|
+
* permission: "Edit",
|
|
43
|
+
* },
|
|
44
|
+
* {
|
|
45
|
+
* builtInRole: "Viewer",
|
|
46
|
+
* permission: "Query",
|
|
47
|
+
* },
|
|
48
|
+
* {
|
|
49
|
+
* userId: sa.id,
|
|
50
|
+
* permission: "Query",
|
|
51
|
+
* },
|
|
52
|
+
* ],
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
* <!--End PulumiCodeChooser -->
|
|
56
|
+
*
|
|
57
|
+
* ## Import
|
|
58
|
+
*
|
|
59
|
+
* ```sh
|
|
60
|
+
* $ pulumi import grafana:index/dataSourcePermission:DataSourcePermission name "{{ datasourceID }}"
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* ```sh
|
|
64
|
+
* $ pulumi import grafana:index/dataSourcePermission:DataSourcePermission name "{{ orgID }}:{{ datasourceID }}"
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
4
67
|
export declare class DataSourcePermission extends pulumi.CustomResource {
|
|
5
68
|
/**
|
|
6
69
|
* Get an existing DataSourcePermission resource's state with the given name, ID, and optional extra
|
|
@@ -18,7 +81,7 @@ export declare class DataSourcePermission extends pulumi.CustomResource {
|
|
|
18
81
|
*/
|
|
19
82
|
static isInstance(obj: any): obj is DataSourcePermission;
|
|
20
83
|
/**
|
|
21
|
-
* Deprecated: Use `
|
|
84
|
+
* Deprecated: Use `datasourceUid` instead.
|
|
22
85
|
*
|
|
23
86
|
* @deprecated Use `datasourceUid` instead
|
|
24
87
|
*/
|
|
@@ -49,7 +112,7 @@ export declare class DataSourcePermission extends pulumi.CustomResource {
|
|
|
49
112
|
*/
|
|
50
113
|
export interface DataSourcePermissionState {
|
|
51
114
|
/**
|
|
52
|
-
* Deprecated: Use `
|
|
115
|
+
* Deprecated: Use `datasourceUid` instead.
|
|
53
116
|
*
|
|
54
117
|
* @deprecated Use `datasourceUid` instead
|
|
55
118
|
*/
|
|
@@ -72,7 +135,7 @@ export interface DataSourcePermissionState {
|
|
|
72
135
|
*/
|
|
73
136
|
export interface DataSourcePermissionArgs {
|
|
74
137
|
/**
|
|
75
|
-
* Deprecated: Use `
|
|
138
|
+
* Deprecated: Use `datasourceUid` instead.
|
|
76
139
|
*
|
|
77
140
|
* @deprecated Use `datasourceUid` instead
|
|
78
141
|
*/
|
package/dataSourcePermission.js
CHANGED
|
@@ -5,6 +5,69 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.DataSourcePermission = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages the entire set of permissions for a datasource. Permissions that aren't specified when applying this resource will be removed.
|
|
10
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/datasource_permissions/)
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* <!--Start PulumiCodeChooser -->
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
17
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
18
|
+
*
|
|
19
|
+
* const team = new grafana.Team("team", {});
|
|
20
|
+
* const foo = new grafana.DataSource("foo", {
|
|
21
|
+
* type: "cloudwatch",
|
|
22
|
+
* jsonDataEncoded: JSON.stringify({
|
|
23
|
+
* defaultRegion: "us-east-1",
|
|
24
|
+
* authType: "keys",
|
|
25
|
+
* }),
|
|
26
|
+
* secureJsonDataEncoded: JSON.stringify({
|
|
27
|
+
* accessKey: "123",
|
|
28
|
+
* secretKey: "456",
|
|
29
|
+
* }),
|
|
30
|
+
* });
|
|
31
|
+
* const user = new grafana.User("user", {
|
|
32
|
+
* email: "test-ds-permissions@example.com",
|
|
33
|
+
* login: "test-ds-permissions",
|
|
34
|
+
* password: "hunter2",
|
|
35
|
+
* });
|
|
36
|
+
* const sa = new grafana.ServiceAccount("sa", {role: "Viewer"});
|
|
37
|
+
* const fooPermissions = new grafana.DataSourcePermission("fooPermissions", {
|
|
38
|
+
* datasourceUid: foo.uid,
|
|
39
|
+
* permissions: [
|
|
40
|
+
* {
|
|
41
|
+
* teamId: team.id,
|
|
42
|
+
* permission: "Edit",
|
|
43
|
+
* },
|
|
44
|
+
* {
|
|
45
|
+
* userId: user.id,
|
|
46
|
+
* permission: "Edit",
|
|
47
|
+
* },
|
|
48
|
+
* {
|
|
49
|
+
* builtInRole: "Viewer",
|
|
50
|
+
* permission: "Query",
|
|
51
|
+
* },
|
|
52
|
+
* {
|
|
53
|
+
* userId: sa.id,
|
|
54
|
+
* permission: "Query",
|
|
55
|
+
* },
|
|
56
|
+
* ],
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
* <!--End PulumiCodeChooser -->
|
|
60
|
+
*
|
|
61
|
+
* ## Import
|
|
62
|
+
*
|
|
63
|
+
* ```sh
|
|
64
|
+
* $ pulumi import grafana:index/dataSourcePermission:DataSourcePermission name "{{ datasourceID }}"
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* ```sh
|
|
68
|
+
* $ pulumi import grafana:index/dataSourcePermission:DataSourcePermission name "{{ orgID }}:{{ datasourceID }}"
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
8
71
|
class DataSourcePermission extends pulumi.CustomResource {
|
|
9
72
|
/**
|
|
10
73
|
* Get an existing DataSourcePermission resource's state with the given name, ID, and optional extra
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSourcePermission.js","sourceRoot":"","sources":["../dataSourcePermission.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,MAAa,oBAAqB,SAAQ,MAAM,CAAC,cAAc;IAC3D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAiC,EAAE,IAAmC;QAC/H,OAAO,IAAI,oBAAoB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC3E,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,oBAAoB,CAAC,YAAY,CAAC;IACrE,CAAC;IA6BD,YAAY,IAAY,EAAE,WAAkE,EAAE,IAAmC;QAC7H,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAoD,CAAC;YACnE,cAAc,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;YACxE,cAAc,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1E,cAAc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CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;YACxE,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;SACvE;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,oBAAoB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;;AAzEL,oDA0EC;AA5DG,gBAAgB;AACO,iCAAY,GAAG,yDAAyD,CAAC"}
|
|
@@ -1,4 +1,65 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Manages a single permission item for a datasource. Conflicts with the "grafana.DataSourcePermission" resource which manages the entire set of permissions for a datasource.
|
|
4
|
+
*
|
|
5
|
+
* ## Example Usage
|
|
6
|
+
*
|
|
7
|
+
* <!--Start PulumiCodeChooser -->
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
10
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
11
|
+
*
|
|
12
|
+
* const teamTeam = new grafana.Team("teamTeam", {});
|
|
13
|
+
* const foo = new grafana.DataSource("foo", {
|
|
14
|
+
* type: "cloudwatch",
|
|
15
|
+
* jsonDataEncoded: JSON.stringify({
|
|
16
|
+
* defaultRegion: "us-east-1",
|
|
17
|
+
* authType: "keys",
|
|
18
|
+
* }),
|
|
19
|
+
* secureJsonDataEncoded: JSON.stringify({
|
|
20
|
+
* accessKey: "123",
|
|
21
|
+
* secretKey: "456",
|
|
22
|
+
* }),
|
|
23
|
+
* });
|
|
24
|
+
* const userUser = new grafana.User("userUser", {
|
|
25
|
+
* email: "test-ds-permissions@example.com",
|
|
26
|
+
* login: "test-ds-permissions",
|
|
27
|
+
* password: "hunter2",
|
|
28
|
+
* });
|
|
29
|
+
* const sa = new grafana.ServiceAccount("sa", {role: "Viewer"});
|
|
30
|
+
* const teamDataSourcePermissionItem = new grafana.DataSourcePermissionItem("teamDataSourcePermissionItem", {
|
|
31
|
+
* datasourceUid: foo.uid,
|
|
32
|
+
* team: teamTeam.id,
|
|
33
|
+
* permission: "Edit",
|
|
34
|
+
* });
|
|
35
|
+
* const userDataSourcePermissionItem = new grafana.DataSourcePermissionItem("userDataSourcePermissionItem", {
|
|
36
|
+
* datasourceUid: foo.uid,
|
|
37
|
+
* user: userUser.id,
|
|
38
|
+
* permission: "Edit",
|
|
39
|
+
* });
|
|
40
|
+
* const role = new grafana.DataSourcePermissionItem("role", {
|
|
41
|
+
* datasourceUid: foo.uid,
|
|
42
|
+
* role: "Viewer",
|
|
43
|
+
* permission: "Query",
|
|
44
|
+
* });
|
|
45
|
+
* const serviceAccount = new grafana.DataSourcePermissionItem("serviceAccount", {
|
|
46
|
+
* datasourceUid: foo.uid,
|
|
47
|
+
* user: sa.id,
|
|
48
|
+
* permission: "Query",
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
* <!--End PulumiCodeChooser -->
|
|
52
|
+
*
|
|
53
|
+
* ## Import
|
|
54
|
+
*
|
|
55
|
+
* ```sh
|
|
56
|
+
* $ pulumi import grafana:index/dataSourcePermissionItem:DataSourcePermissionItem name "{{ datasourceUID }}:{{ type (role, team, or user) }}:{{ identifier }}"
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* ```sh
|
|
60
|
+
* $ pulumi import grafana:index/dataSourcePermissionItem:DataSourcePermissionItem name "{{ orgID }}:{{ datasourceUID }}:{{ type (role, team, or user) }}:{{ identifier }}"
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
2
63
|
export declare class DataSourcePermissionItem extends pulumi.CustomResource {
|
|
3
64
|
/**
|
|
4
65
|
* Get an existing DataSourcePermissionItem resource's state with the given name, ID, and optional extra
|
|
@@ -5,6 +5,67 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.DataSourcePermissionItem = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages a single permission item for a datasource. Conflicts with the "grafana.DataSourcePermission" resource which manages the entire set of permissions for a datasource.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* <!--Start PulumiCodeChooser -->
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
17
|
+
*
|
|
18
|
+
* const teamTeam = new grafana.Team("teamTeam", {});
|
|
19
|
+
* const foo = new grafana.DataSource("foo", {
|
|
20
|
+
* type: "cloudwatch",
|
|
21
|
+
* jsonDataEncoded: JSON.stringify({
|
|
22
|
+
* defaultRegion: "us-east-1",
|
|
23
|
+
* authType: "keys",
|
|
24
|
+
* }),
|
|
25
|
+
* secureJsonDataEncoded: JSON.stringify({
|
|
26
|
+
* accessKey: "123",
|
|
27
|
+
* secretKey: "456",
|
|
28
|
+
* }),
|
|
29
|
+
* });
|
|
30
|
+
* const userUser = new grafana.User("userUser", {
|
|
31
|
+
* email: "test-ds-permissions@example.com",
|
|
32
|
+
* login: "test-ds-permissions",
|
|
33
|
+
* password: "hunter2",
|
|
34
|
+
* });
|
|
35
|
+
* const sa = new grafana.ServiceAccount("sa", {role: "Viewer"});
|
|
36
|
+
* const teamDataSourcePermissionItem = new grafana.DataSourcePermissionItem("teamDataSourcePermissionItem", {
|
|
37
|
+
* datasourceUid: foo.uid,
|
|
38
|
+
* team: teamTeam.id,
|
|
39
|
+
* permission: "Edit",
|
|
40
|
+
* });
|
|
41
|
+
* const userDataSourcePermissionItem = new grafana.DataSourcePermissionItem("userDataSourcePermissionItem", {
|
|
42
|
+
* datasourceUid: foo.uid,
|
|
43
|
+
* user: userUser.id,
|
|
44
|
+
* permission: "Edit",
|
|
45
|
+
* });
|
|
46
|
+
* const role = new grafana.DataSourcePermissionItem("role", {
|
|
47
|
+
* datasourceUid: foo.uid,
|
|
48
|
+
* role: "Viewer",
|
|
49
|
+
* permission: "Query",
|
|
50
|
+
* });
|
|
51
|
+
* const serviceAccount = new grafana.DataSourcePermissionItem("serviceAccount", {
|
|
52
|
+
* datasourceUid: foo.uid,
|
|
53
|
+
* user: sa.id,
|
|
54
|
+
* permission: "Query",
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
* <!--End PulumiCodeChooser -->
|
|
58
|
+
*
|
|
59
|
+
* ## Import
|
|
60
|
+
*
|
|
61
|
+
* ```sh
|
|
62
|
+
* $ pulumi import grafana:index/dataSourcePermissionItem:DataSourcePermissionItem name "{{ datasourceUID }}:{{ type (role, team, or user) }}:{{ identifier }}"
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* ```sh
|
|
66
|
+
* $ pulumi import grafana:index/dataSourcePermissionItem:DataSourcePermissionItem name "{{ orgID }}:{{ datasourceUID }}:{{ type (role, team, or user) }}:{{ identifier }}"
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
8
69
|
class DataSourcePermissionItem extends pulumi.CustomResource {
|
|
9
70
|
/**
|
|
10
71
|
* Get an existing DataSourcePermissionItem resource's state with the given name, ID, and optional extra
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSourcePermissionItem.js","sourceRoot":"","sources":["../dataSourcePermissionItem.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,wBAAyB,SAAQ,MAAM,CAAC,cAAc;I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AAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;SACzD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,wBAAwB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7E,CAAC;;AAzFL,4DA0FC;AA5EG,gBAAgB;AACO,qCAAY,GAAG,iEAAiE,CAAC"}
|
package/folder.d.ts
CHANGED
|
@@ -1,4 +1,41 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/manage-dashboards/)
|
|
4
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/folder/)
|
|
5
|
+
*
|
|
6
|
+
* ## Example Usage
|
|
7
|
+
*
|
|
8
|
+
* <!--Start PulumiCodeChooser -->
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
12
|
+
*
|
|
13
|
+
* const testFolderFolder = new grafana.Folder("testFolderFolder", {title: "Terraform Test Folder"});
|
|
14
|
+
* const testFolderDashboard = new grafana.Dashboard("testFolderDashboard", {
|
|
15
|
+
* folder: testFolderFolder.id,
|
|
16
|
+
* configJson: `{
|
|
17
|
+
* "title": "Dashboard in folder",
|
|
18
|
+
* "uid": "dashboard-in-folder"
|
|
19
|
+
* }
|
|
20
|
+
* `,
|
|
21
|
+
* });
|
|
22
|
+
* const testFolderWithUid = new grafana.Folder("testFolderWithUid", {
|
|
23
|
+
* uid: "test-folder-uid",
|
|
24
|
+
* title: "Terraform Test Folder With UID",
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
* <!--End PulumiCodeChooser -->
|
|
28
|
+
*
|
|
29
|
+
* ## Import
|
|
30
|
+
*
|
|
31
|
+
* ```sh
|
|
32
|
+
* $ pulumi import grafana:index/folder:Folder name "{{ uid }}"
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* ```sh
|
|
36
|
+
* $ pulumi import grafana:index/folder:Folder name "{{ orgID }}:{{ uid }}"
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
2
39
|
export declare class Folder extends pulumi.CustomResource {
|
|
3
40
|
/**
|
|
4
41
|
* Get an existing Folder resource's state with the given name, ID, and optional extra
|
|
@@ -20,12 +57,11 @@ export declare class Folder extends pulumi.CustomResource {
|
|
|
20
57
|
*/
|
|
21
58
|
readonly orgId: pulumi.Output<string | undefined>;
|
|
22
59
|
/**
|
|
23
|
-
* The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root
|
|
24
|
-
* folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
|
|
60
|
+
* The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
|
|
25
61
|
*/
|
|
26
62
|
readonly parentFolderUid: pulumi.Output<string | undefined>;
|
|
27
63
|
/**
|
|
28
|
-
* Prevent deletion of the folder if it is not empty (contains dashboards or alert rules).
|
|
64
|
+
* Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). Defaults to `false`.
|
|
29
65
|
*/
|
|
30
66
|
readonly preventDestroyIfNotEmpty: pulumi.Output<boolean | undefined>;
|
|
31
67
|
/**
|
|
@@ -58,12 +94,11 @@ export interface FolderState {
|
|
|
58
94
|
*/
|
|
59
95
|
orgId?: pulumi.Input<string>;
|
|
60
96
|
/**
|
|
61
|
-
* The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root
|
|
62
|
-
* folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
|
|
97
|
+
* The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
|
|
63
98
|
*/
|
|
64
99
|
parentFolderUid?: pulumi.Input<string>;
|
|
65
100
|
/**
|
|
66
|
-
* Prevent deletion of the folder if it is not empty (contains dashboards or alert rules).
|
|
101
|
+
* Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). Defaults to `false`.
|
|
67
102
|
*/
|
|
68
103
|
preventDestroyIfNotEmpty?: pulumi.Input<boolean>;
|
|
69
104
|
/**
|
|
@@ -88,12 +123,11 @@ export interface FolderArgs {
|
|
|
88
123
|
*/
|
|
89
124
|
orgId?: pulumi.Input<string>;
|
|
90
125
|
/**
|
|
91
|
-
* The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root
|
|
92
|
-
* folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
|
|
126
|
+
* The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
|
|
93
127
|
*/
|
|
94
128
|
parentFolderUid?: pulumi.Input<string>;
|
|
95
129
|
/**
|
|
96
|
-
* Prevent deletion of the folder if it is not empty (contains dashboards or alert rules).
|
|
130
|
+
* Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). Defaults to `false`.
|
|
97
131
|
*/
|
|
98
132
|
preventDestroyIfNotEmpty?: pulumi.Input<boolean>;
|
|
99
133
|
/**
|
package/folder.js
CHANGED
|
@@ -5,6 +5,43 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.Folder = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/manage-dashboards/)
|
|
10
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/folder/)
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* <!--Start PulumiCodeChooser -->
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
17
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
18
|
+
*
|
|
19
|
+
* const testFolderFolder = new grafana.Folder("testFolderFolder", {title: "Terraform Test Folder"});
|
|
20
|
+
* const testFolderDashboard = new grafana.Dashboard("testFolderDashboard", {
|
|
21
|
+
* folder: testFolderFolder.id,
|
|
22
|
+
* configJson: `{
|
|
23
|
+
* "title": "Dashboard in folder",
|
|
24
|
+
* "uid": "dashboard-in-folder"
|
|
25
|
+
* }
|
|
26
|
+
* `,
|
|
27
|
+
* });
|
|
28
|
+
* const testFolderWithUid = new grafana.Folder("testFolderWithUid", {
|
|
29
|
+
* uid: "test-folder-uid",
|
|
30
|
+
* title: "Terraform Test Folder With UID",
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
* <!--End PulumiCodeChooser -->
|
|
34
|
+
*
|
|
35
|
+
* ## Import
|
|
36
|
+
*
|
|
37
|
+
* ```sh
|
|
38
|
+
* $ pulumi import grafana:index/folder:Folder name "{{ uid }}"
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* ```sh
|
|
42
|
+
* $ pulumi import grafana:index/folder:Folder name "{{ orgID }}:{{ uid }}"
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
8
45
|
class Folder extends pulumi.CustomResource {
|
|
9
46
|
/**
|
|
10
47
|
* Get an existing Folder resource's state with the given name, ID, and optional extra
|