@pulumiverse/grafana 0.2.1-alpha.1709570924

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.
Files changed (252) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +54 -0
  3. package/annotation.d.ts +151 -0
  4. package/annotation.js +79 -0
  5. package/annotation.js.map +1 -0
  6. package/apiKey.d.ts +77 -0
  7. package/apiKey.js +80 -0
  8. package/apiKey.js.map +1 -0
  9. package/cloudAccessPolicy.d.ts +156 -0
  10. package/cloudAccessPolicy.js +115 -0
  11. package/cloudAccessPolicy.js.map +1 -0
  12. package/cloudAccessPolicyToken.d.ts +151 -0
  13. package/cloudAccessPolicyToken.js +108 -0
  14. package/cloudAccessPolicyToken.js.map +1 -0
  15. package/cloudApiKey.d.ts +102 -0
  16. package/cloudApiKey.js +85 -0
  17. package/cloudApiKey.js.map +1 -0
  18. package/cloudPluginInstallation.d.ts +96 -0
  19. package/cloudPluginInstallation.js +86 -0
  20. package/cloudPluginInstallation.js.map +1 -0
  21. package/cloudStack.d.ts +291 -0
  22. package/cloudStack.js +142 -0
  23. package/cloudStack.js.map +1 -0
  24. package/cloudStackApiKey.d.ts +52 -0
  25. package/cloudStackApiKey.js +67 -0
  26. package/cloudStackApiKey.js.map +1 -0
  27. package/cloudStackServiceAccount.d.ts +97 -0
  28. package/cloudStackServiceAccount.js +80 -0
  29. package/cloudStackServiceAccount.js.map +1 -0
  30. package/cloudStackServiceAccountToken.d.ts +78 -0
  31. package/cloudStackServiceAccountToken.js +93 -0
  32. package/cloudStackServiceAccountToken.js.map +1 -0
  33. package/config/index.d.ts +1 -0
  34. package/config/index.js +21 -0
  35. package/config/index.js.map +1 -0
  36. package/config/vars.d.ts +89 -0
  37. package/config/vars.js +131 -0
  38. package/config/vars.js.map +1 -0
  39. package/contactPoint.d.ts +310 -0
  40. package/contactPoint.js +119 -0
  41. package/contactPoint.js.map +1 -0
  42. package/dashboard.d.ts +154 -0
  43. package/dashboard.js +94 -0
  44. package/dashboard.js.map +1 -0
  45. package/dashboardPermission.d.ts +131 -0
  46. package/dashboardPermission.js +97 -0
  47. package/dashboardPermission.js.map +1 -0
  48. package/dataSource.d.ts +294 -0
  49. package/dataSource.js +164 -0
  50. package/dataSource.js.map +1 -0
  51. package/dataSourcePermission.d.ts +124 -0
  52. package/dataSourcePermission.js +109 -0
  53. package/dataSourcePermission.js.map +1 -0
  54. package/folder.d.ts +127 -0
  55. package/folder.js +95 -0
  56. package/folder.js.map +1 -0
  57. package/folderPermission.d.ts +106 -0
  58. package/folderPermission.js +91 -0
  59. package/folderPermission.js.map +1 -0
  60. package/getCloudIps.d.ts +56 -0
  61. package/getCloudIps.js +41 -0
  62. package/getCloudIps.js.map +1 -0
  63. package/getCloudOrganization.d.ts +37 -0
  64. package/getCloudOrganization.js +21 -0
  65. package/getCloudOrganization.js.map +1 -0
  66. package/getCloudStack.d.ts +130 -0
  67. package/getCloudStack.js +25 -0
  68. package/getCloudStack.js.map +1 -0
  69. package/getDashboard.d.ts +134 -0
  70. package/getDashboard.js +81 -0
  71. package/getDashboard.js.map +1 -0
  72. package/getDashboards.d.ts +74 -0
  73. package/getDashboards.js +36 -0
  74. package/getDashboards.js.map +1 -0
  75. package/getDataSource.d.ts +156 -0
  76. package/getDataSource.js +95 -0
  77. package/getDataSource.js.map +1 -0
  78. package/getFolder.d.ts +82 -0
  79. package/getFolder.js +59 -0
  80. package/getFolder.js.map +1 -0
  81. package/getFolders.d.ts +61 -0
  82. package/getFolders.js +61 -0
  83. package/getFolders.js.map +1 -0
  84. package/getLibraryPanel.d.ts +108 -0
  85. package/getLibraryPanel.js +28 -0
  86. package/getLibraryPanel.js.map +1 -0
  87. package/getOnCallSlackChannel.d.ts +66 -0
  88. package/getOnCallSlackChannel.js +47 -0
  89. package/getOnCallSlackChannel.js.map +1 -0
  90. package/getOncallAction.d.ts +46 -0
  91. package/getOncallAction.js +31 -0
  92. package/getOncallAction.js.map +1 -0
  93. package/getOncallEscalationChain.d.ts +62 -0
  94. package/getOncallEscalationChain.js +47 -0
  95. package/getOncallEscalationChain.js.map +1 -0
  96. package/getOncallOutgoingWebhook.d.ts +62 -0
  97. package/getOncallOutgoingWebhook.js +47 -0
  98. package/getOncallOutgoingWebhook.js.map +1 -0
  99. package/getOncallSchedule.d.ts +68 -0
  100. package/getOncallSchedule.js +49 -0
  101. package/getOncallSchedule.js.map +1 -0
  102. package/getOncallTeam.d.ts +60 -0
  103. package/getOncallTeam.js +43 -0
  104. package/getOncallTeam.js.map +1 -0
  105. package/getOncallUser.d.ts +70 -0
  106. package/getOncallUser.js +47 -0
  107. package/getOncallUser.js.map +1 -0
  108. package/getOncallUserGroup.d.ts +54 -0
  109. package/getOncallUserGroup.js +47 -0
  110. package/getOncallUserGroup.js.map +1 -0
  111. package/getOrganization.d.ts +94 -0
  112. package/getOrganization.js +67 -0
  113. package/getOrganization.js.map +1 -0
  114. package/getOrganizationPreferences.d.ts +62 -0
  115. package/getOrganizationPreferences.js +43 -0
  116. package/getOrganizationPreferences.js.map +1 -0
  117. package/getRole.d.ts +147 -0
  118. package/getRole.js +95 -0
  119. package/getRole.js.map +1 -0
  120. package/getSlos.d.ts +31 -0
  121. package/getSlos.js +31 -0
  122. package/getSlos.js.map +1 -0
  123. package/getSyntheticMonitoringProbe.d.ts +88 -0
  124. package/getSyntheticMonitoringProbe.js +47 -0
  125. package/getSyntheticMonitoringProbe.js.map +1 -0
  126. package/getSyntheticMonitoringProbes.d.ts +64 -0
  127. package/getSyntheticMonitoringProbes.js +44 -0
  128. package/getSyntheticMonitoringProbes.js.map +1 -0
  129. package/getTeam.d.ts +83 -0
  130. package/getTeam.js +67 -0
  131. package/getTeam.js.map +1 -0
  132. package/getUser.d.ts +128 -0
  133. package/getUser.js +84 -0
  134. package/getUser.js.map +1 -0
  135. package/getUsers.d.ts +61 -0
  136. package/getUsers.js +61 -0
  137. package/getUsers.js.map +1 -0
  138. package/index.d.ts +228 -0
  139. package/index.js +353 -0
  140. package/index.js.map +1 -0
  141. package/libraryPanel.d.ts +193 -0
  142. package/libraryPanel.js +103 -0
  143. package/libraryPanel.js.map +1 -0
  144. package/machineLearningHoliday.d.ts +103 -0
  145. package/machineLearningHoliday.js +62 -0
  146. package/machineLearningHoliday.js.map +1 -0
  147. package/machineLearningJob.d.ts +201 -0
  148. package/machineLearningJob.js +83 -0
  149. package/machineLearningJob.js.map +1 -0
  150. package/machineLearningOutlierDetector.d.ts +159 -0
  151. package/machineLearningOutlierDetector.js +84 -0
  152. package/machineLearningOutlierDetector.js.map +1 -0
  153. package/messageTemplate.d.ts +86 -0
  154. package/messageTemplate.js +80 -0
  155. package/messageTemplate.js.map +1 -0
  156. package/muteTiming.d.ts +106 -0
  157. package/muteTiming.js +95 -0
  158. package/muteTiming.js.map +1 -0
  159. package/notificationPolicy.d.ts +186 -0
  160. package/notificationPolicy.js +141 -0
  161. package/notificationPolicy.js.map +1 -0
  162. package/oncallEscalation.d.ts +227 -0
  163. package/oncallEscalation.js +124 -0
  164. package/oncallEscalation.js.map +1 -0
  165. package/oncallEscalationChain.d.ts +80 -0
  166. package/oncallEscalationChain.js +71 -0
  167. package/oncallEscalationChain.js.map +1 -0
  168. package/oncallIntegration.d.ts +116 -0
  169. package/oncallIntegration.js +75 -0
  170. package/oncallIntegration.js.map +1 -0
  171. package/oncallOnCallShift.d.ts +237 -0
  172. package/oncallOnCallShift.js +97 -0
  173. package/oncallOnCallShift.js.map +1 -0
  174. package/oncallOutgoingWebhook.d.ts +152 -0
  175. package/oncallOutgoingWebhook.js +88 -0
  176. package/oncallOutgoingWebhook.js.map +1 -0
  177. package/oncallRoute.d.ts +175 -0
  178. package/oncallRoute.js +116 -0
  179. package/oncallRoute.js.map +1 -0
  180. package/oncallSchedule.d.ts +187 -0
  181. package/oncallSchedule.js +109 -0
  182. package/oncallSchedule.js.map +1 -0
  183. package/organization.d.ts +193 -0
  184. package/organization.js +96 -0
  185. package/organization.js.map +1 -0
  186. package/organizationPreference.d.ts +125 -0
  187. package/organizationPreference.js +76 -0
  188. package/organizationPreference.js.map +1 -0
  189. package/package.json +30 -0
  190. package/package.json.bak +29 -0
  191. package/package.json.dev +29 -0
  192. package/playlist.d.ts +72 -0
  193. package/playlist.js +65 -0
  194. package/playlist.js.map +1 -0
  195. package/provider.d.ts +166 -0
  196. package/provider.js +64 -0
  197. package/provider.js.map +1 -0
  198. package/report.d.ts +241 -0
  199. package/report.js +110 -0
  200. package/report.js.map +1 -0
  201. package/role.d.ts +210 -0
  202. package/role.js +109 -0
  203. package/role.js.map +1 -0
  204. package/roleAssignment.d.ts +131 -0
  205. package/roleAssignment.js +95 -0
  206. package/roleAssignment.js.map +1 -0
  207. package/ruleGroup.d.ts +203 -0
  208. package/ruleGroup.js +174 -0
  209. package/ruleGroup.js.map +1 -0
  210. package/scripts/install-pulumi-plugin.js +21 -0
  211. package/serviceAccount.d.ts +102 -0
  212. package/serviceAccount.js +73 -0
  213. package/serviceAccount.js.map +1 -0
  214. package/serviceAccountPermission.d.ts +110 -0
  215. package/serviceAccountPermission.js +95 -0
  216. package/serviceAccountPermission.js.map +1 -0
  217. package/serviceAccountToken.d.ts +72 -0
  218. package/serviceAccountToken.js +85 -0
  219. package/serviceAccountToken.js.map +1 -0
  220. package/slo.d.ts +131 -0
  221. package/slo.js +77 -0
  222. package/slo.js.map +1 -0
  223. package/syntheticMonitoringCheck.d.ts +555 -0
  224. package/syntheticMonitoringCheck.js +464 -0
  225. package/syntheticMonitoringCheck.js.map +1 -0
  226. package/syntheticMonitoringInstallation.d.ts +112 -0
  227. package/syntheticMonitoringInstallation.js +95 -0
  228. package/syntheticMonitoringInstallation.js.map +1 -0
  229. package/syntheticMonitoringProbe.d.ts +164 -0
  230. package/syntheticMonitoringProbe.js +108 -0
  231. package/syntheticMonitoringProbe.js.map +1 -0
  232. package/team.d.ts +165 -0
  233. package/team.js +89 -0
  234. package/team.js.map +1 -0
  235. package/teamExternalGroup.d.ts +84 -0
  236. package/teamExternalGroup.js +81 -0
  237. package/teamExternalGroup.js.map +1 -0
  238. package/types/index.d.ts +3 -0
  239. package/types/index.js +11 -0
  240. package/types/index.js.map +1 -0
  241. package/types/input.d.ts +1914 -0
  242. package/types/input.js +5 -0
  243. package/types/input.js.map +1 -0
  244. package/types/output.d.ts +2011 -0
  245. package/types/output.js +5 -0
  246. package/types/output.js.map +1 -0
  247. package/user.d.ts +132 -0
  248. package/user.js +95 -0
  249. package/user.js.map +1 -0
  250. package/utilities.d.ts +4 -0
  251. package/utilities.js +69 -0
  252. package/utilities.js.map +1 -0
package/role.js ADDED
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Role = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * **Note:** This resource is available only with Grafana Enterprise 8.+.
10
+ *
11
+ * * [Official documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/)
12
+ * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/access_control/)
13
+ *
14
+ * ## Example Usage
15
+ *
16
+ * ```typescript
17
+ * import * as pulumi from "@pulumi/pulumi";
18
+ * import * as grafana from "@pulumiverse/grafana";
19
+ *
20
+ * const superUser = new grafana.Role("superUser", {
21
+ * description: "My Super User description",
22
+ * global: true,
23
+ * permissions: [
24
+ * {
25
+ * action: "org.users:add",
26
+ * scope: "users:*",
27
+ * },
28
+ * {
29
+ * action: "org.users:write",
30
+ * scope: "users:*",
31
+ * },
32
+ * {
33
+ * action: "org.users:read",
34
+ * scope: "users:*",
35
+ * },
36
+ * ],
37
+ * uid: "superuseruid",
38
+ * version: 1,
39
+ * });
40
+ * ```
41
+ *
42
+ * ## Import
43
+ *
44
+ * ```sh
45
+ * $ pulumi import grafana:index/role:Role role_name {{uid}}
46
+ * ```
47
+ */
48
+ class Role extends pulumi.CustomResource {
49
+ /**
50
+ * Get an existing Role resource's state with the given name, ID, and optional extra
51
+ * properties used to qualify the lookup.
52
+ *
53
+ * @param name The _unique_ name of the resulting resource.
54
+ * @param id The _unique_ provider ID of the resource to lookup.
55
+ * @param state Any extra arguments used during the lookup.
56
+ * @param opts Optional settings to control the behavior of the CustomResource.
57
+ */
58
+ static get(name, id, state, opts) {
59
+ return new Role(name, state, Object.assign(Object.assign({}, opts), { id: id }));
60
+ }
61
+ /**
62
+ * Returns true if the given object is an instance of Role. This is designed to work even
63
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
64
+ */
65
+ static isInstance(obj) {
66
+ if (obj === undefined || obj === null) {
67
+ return false;
68
+ }
69
+ return obj['__pulumiType'] === Role.__pulumiType;
70
+ }
71
+ constructor(name, argsOrState, opts) {
72
+ let resourceInputs = {};
73
+ opts = opts || {};
74
+ if (opts.id) {
75
+ const state = argsOrState;
76
+ resourceInputs["autoIncrementVersion"] = state ? state.autoIncrementVersion : undefined;
77
+ resourceInputs["description"] = state ? state.description : undefined;
78
+ resourceInputs["displayName"] = state ? state.displayName : undefined;
79
+ resourceInputs["global"] = state ? state.global : undefined;
80
+ resourceInputs["group"] = state ? state.group : undefined;
81
+ resourceInputs["hidden"] = state ? state.hidden : undefined;
82
+ resourceInputs["name"] = state ? state.name : undefined;
83
+ resourceInputs["orgId"] = state ? state.orgId : undefined;
84
+ resourceInputs["permissions"] = state ? state.permissions : undefined;
85
+ resourceInputs["uid"] = state ? state.uid : undefined;
86
+ resourceInputs["version"] = state ? state.version : undefined;
87
+ }
88
+ else {
89
+ const args = argsOrState;
90
+ resourceInputs["autoIncrementVersion"] = args ? args.autoIncrementVersion : undefined;
91
+ resourceInputs["description"] = args ? args.description : undefined;
92
+ resourceInputs["displayName"] = args ? args.displayName : undefined;
93
+ resourceInputs["global"] = args ? args.global : undefined;
94
+ resourceInputs["group"] = args ? args.group : undefined;
95
+ resourceInputs["hidden"] = args ? args.hidden : undefined;
96
+ resourceInputs["name"] = args ? args.name : undefined;
97
+ resourceInputs["orgId"] = args ? args.orgId : undefined;
98
+ resourceInputs["permissions"] = args ? args.permissions : undefined;
99
+ resourceInputs["uid"] = args ? args.uid : undefined;
100
+ resourceInputs["version"] = args ? args.version : undefined;
101
+ }
102
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
103
+ super(Role.__pulumiType, name, resourceInputs, opts);
104
+ }
105
+ }
106
+ exports.Role = Role;
107
+ /** @internal */
108
+ Role.__pulumiType = 'grafana:index/role:Role';
109
+ //# sourceMappingURL=role.js.map
package/role.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role.js","sourceRoot":"","sources":["../role.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAC3C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAiB,EAAE,IAAmC;QAC/G,OAAO,IAAI,IAAI,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC3D,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,IAAI,CAAC,YAAY,CAAC;IACrD,CAAC;IAuDD,YAAY,IAAY,EAAE,WAAkC,EAAE,IAAmC;QAC7F,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;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CAAC,CAAC,SAAS,CAAC;SAC/D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;;AAjHL,oBAkHC;AApGG,gBAAgB;AACO,iBAAY,GAAG,yBAAyB,CAAC"}
@@ -0,0 +1,131 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * **Note:** This resource is available only with Grafana Enterprise 9.2+.
4
+ * * [Official documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/)
5
+ * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/access_control/)
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as grafana from "@pulumiverse/grafana";
12
+ *
13
+ * const testRole = new grafana.Role("testRole", {
14
+ * uid: "testrole",
15
+ * version: 1,
16
+ * global: true,
17
+ * permissions: [{
18
+ * action: "org.users:add",
19
+ * scope: "users:*",
20
+ * }],
21
+ * });
22
+ * const testTeam = new grafana.Team("testTeam", {});
23
+ * const testUser = new grafana.User("testUser", {
24
+ * email: "terraform_user@test.com",
25
+ * login: "terraform_user@test.com",
26
+ * password: "password",
27
+ * });
28
+ * const testSa = new grafana.ServiceAccount("testSa", {role: "Viewer"});
29
+ * const test = new grafana.RoleAssignment("test", {
30
+ * roleUid: testRole.uid,
31
+ * users: [testUser.id],
32
+ * teams: [testTeam.id],
33
+ * serviceAccounts: [testSa.id],
34
+ * });
35
+ * ```
36
+ */
37
+ export declare class RoleAssignment extends pulumi.CustomResource {
38
+ /**
39
+ * Get an existing RoleAssignment resource's state with the given name, ID, and optional extra
40
+ * properties used to qualify the lookup.
41
+ *
42
+ * @param name The _unique_ name of the resulting resource.
43
+ * @param id The _unique_ provider ID of the resource to lookup.
44
+ * @param state Any extra arguments used during the lookup.
45
+ * @param opts Optional settings to control the behavior of the CustomResource.
46
+ */
47
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RoleAssignmentState, opts?: pulumi.CustomResourceOptions): RoleAssignment;
48
+ /**
49
+ * Returns true if the given object is an instance of RoleAssignment. This is designed to work even
50
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
51
+ */
52
+ static isInstance(obj: any): obj is RoleAssignment;
53
+ /**
54
+ * The Organization ID. If not set, the Org ID defined in the provider block will be used.
55
+ */
56
+ readonly orgId: pulumi.Output<string | undefined>;
57
+ /**
58
+ * Grafana RBAC role UID.
59
+ */
60
+ readonly roleUid: pulumi.Output<string>;
61
+ /**
62
+ * IDs of service accounts that the role should be assigned to.
63
+ */
64
+ readonly serviceAccounts: pulumi.Output<string[] | undefined>;
65
+ /**
66
+ * IDs of teams that the role should be assigned to.
67
+ */
68
+ readonly teams: pulumi.Output<string[] | undefined>;
69
+ /**
70
+ * IDs of users that the role should be assigned to.
71
+ */
72
+ readonly users: pulumi.Output<number[] | undefined>;
73
+ /**
74
+ * Create a RoleAssignment resource with the given unique name, arguments, and options.
75
+ *
76
+ * @param name The _unique_ name of the resource.
77
+ * @param args The arguments to use to populate this resource's properties.
78
+ * @param opts A bag of options that control this resource's behavior.
79
+ */
80
+ constructor(name: string, args: RoleAssignmentArgs, opts?: pulumi.CustomResourceOptions);
81
+ }
82
+ /**
83
+ * Input properties used for looking up and filtering RoleAssignment resources.
84
+ */
85
+ export interface RoleAssignmentState {
86
+ /**
87
+ * The Organization ID. If not set, the Org ID defined in the provider block will be used.
88
+ */
89
+ orgId?: pulumi.Input<string>;
90
+ /**
91
+ * Grafana RBAC role UID.
92
+ */
93
+ roleUid?: pulumi.Input<string>;
94
+ /**
95
+ * IDs of service accounts that the role should be assigned to.
96
+ */
97
+ serviceAccounts?: pulumi.Input<pulumi.Input<string>[]>;
98
+ /**
99
+ * IDs of teams that the role should be assigned to.
100
+ */
101
+ teams?: pulumi.Input<pulumi.Input<string>[]>;
102
+ /**
103
+ * IDs of users that the role should be assigned to.
104
+ */
105
+ users?: pulumi.Input<pulumi.Input<number>[]>;
106
+ }
107
+ /**
108
+ * The set of arguments for constructing a RoleAssignment resource.
109
+ */
110
+ export interface RoleAssignmentArgs {
111
+ /**
112
+ * The Organization ID. If not set, the Org ID defined in the provider block will be used.
113
+ */
114
+ orgId?: pulumi.Input<string>;
115
+ /**
116
+ * Grafana RBAC role UID.
117
+ */
118
+ roleUid: pulumi.Input<string>;
119
+ /**
120
+ * IDs of service accounts that the role should be assigned to.
121
+ */
122
+ serviceAccounts?: pulumi.Input<pulumi.Input<string>[]>;
123
+ /**
124
+ * IDs of teams that the role should be assigned to.
125
+ */
126
+ teams?: pulumi.Input<pulumi.Input<string>[]>;
127
+ /**
128
+ * IDs of users that the role should be assigned to.
129
+ */
130
+ users?: pulumi.Input<pulumi.Input<number>[]>;
131
+ }
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.RoleAssignment = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * **Note:** This resource is available only with Grafana Enterprise 9.2+.
10
+ * * [Official documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/)
11
+ * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/access_control/)
12
+ *
13
+ * ## Example Usage
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as grafana from "@pulumiverse/grafana";
18
+ *
19
+ * const testRole = new grafana.Role("testRole", {
20
+ * uid: "testrole",
21
+ * version: 1,
22
+ * global: true,
23
+ * permissions: [{
24
+ * action: "org.users:add",
25
+ * scope: "users:*",
26
+ * }],
27
+ * });
28
+ * const testTeam = new grafana.Team("testTeam", {});
29
+ * const testUser = new grafana.User("testUser", {
30
+ * email: "terraform_user@test.com",
31
+ * login: "terraform_user@test.com",
32
+ * password: "password",
33
+ * });
34
+ * const testSa = new grafana.ServiceAccount("testSa", {role: "Viewer"});
35
+ * const test = new grafana.RoleAssignment("test", {
36
+ * roleUid: testRole.uid,
37
+ * users: [testUser.id],
38
+ * teams: [testTeam.id],
39
+ * serviceAccounts: [testSa.id],
40
+ * });
41
+ * ```
42
+ */
43
+ class RoleAssignment extends pulumi.CustomResource {
44
+ /**
45
+ * Get an existing RoleAssignment resource's state with the given name, ID, and optional extra
46
+ * properties used to qualify the lookup.
47
+ *
48
+ * @param name The _unique_ name of the resulting resource.
49
+ * @param id The _unique_ provider ID of the resource to lookup.
50
+ * @param state Any extra arguments used during the lookup.
51
+ * @param opts Optional settings to control the behavior of the CustomResource.
52
+ */
53
+ static get(name, id, state, opts) {
54
+ return new RoleAssignment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
55
+ }
56
+ /**
57
+ * Returns true if the given object is an instance of RoleAssignment. This is designed to work even
58
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
59
+ */
60
+ static isInstance(obj) {
61
+ if (obj === undefined || obj === null) {
62
+ return false;
63
+ }
64
+ return obj['__pulumiType'] === RoleAssignment.__pulumiType;
65
+ }
66
+ constructor(name, argsOrState, opts) {
67
+ let resourceInputs = {};
68
+ opts = opts || {};
69
+ if (opts.id) {
70
+ const state = argsOrState;
71
+ resourceInputs["orgId"] = state ? state.orgId : undefined;
72
+ resourceInputs["roleUid"] = state ? state.roleUid : undefined;
73
+ resourceInputs["serviceAccounts"] = state ? state.serviceAccounts : undefined;
74
+ resourceInputs["teams"] = state ? state.teams : undefined;
75
+ resourceInputs["users"] = state ? state.users : undefined;
76
+ }
77
+ else {
78
+ const args = argsOrState;
79
+ if ((!args || args.roleUid === undefined) && !opts.urn) {
80
+ throw new Error("Missing required property 'roleUid'");
81
+ }
82
+ resourceInputs["orgId"] = args ? args.orgId : undefined;
83
+ resourceInputs["roleUid"] = args ? args.roleUid : undefined;
84
+ resourceInputs["serviceAccounts"] = args ? args.serviceAccounts : undefined;
85
+ resourceInputs["teams"] = args ? args.teams : undefined;
86
+ resourceInputs["users"] = args ? args.users : undefined;
87
+ }
88
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
89
+ super(RoleAssignment.__pulumiType, name, resourceInputs, opts);
90
+ }
91
+ }
92
+ exports.RoleAssignment = RoleAssignment;
93
+ /** @internal */
94
+ RoleAssignment.__pulumiType = 'grafana:index/roleAssignment:RoleAssignment';
95
+ //# sourceMappingURL=roleAssignment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roleAssignment.js","sourceRoot":"","sources":["../roleAssignment.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;IACrD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA2B,EAAE,IAAmC;QACzH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACrE,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,cAAc,CAAC,YAAY,CAAC;IAC/D,CAAC;IA+BD,YAAY,IAAY,EAAE,WAAsD,EAAE,IAAmC;QACjH,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,C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,CAAC,CAAC,SAAS,CAAC;YACxD,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;SAC3D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;;AAhFL,wCAiFC;AAnEG,gBAAgB;AACO,2BAAY,GAAG,6CAA6C,CAAC"}
package/ruleGroup.d.ts ADDED
@@ -0,0 +1,203 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ /**
5
+ * Manages Grafana Alerting rule groups.
6
+ *
7
+ * * [Official documentation](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/)
8
+ * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#alert-rules)
9
+ *
10
+ * This resource requires Grafana 9.1.0 or later.
11
+ *
12
+ * ## Example Usage
13
+ *
14
+ * ```typescript
15
+ * import * as pulumi from "@pulumi/pulumi";
16
+ * import * as grafana from "@pulumiverse/grafana";
17
+ *
18
+ * const ruleFolder = new grafana.Folder("ruleFolder", {title: "My Alert Rule Folder"});
19
+ * const myAlertRule = new grafana.RuleGroup("myAlertRule", {
20
+ * folderUid: ruleFolder.uid,
21
+ * intervalSeconds: 240,
22
+ * orgId: "1",
23
+ * rules: [{
24
+ * name: "My Alert Rule 1",
25
+ * "for": "2m",
26
+ * condition: "B",
27
+ * noDataState: "NoData",
28
+ * execErrState: "Alerting",
29
+ * annotations: {
30
+ * a: "b",
31
+ * c: "d",
32
+ * },
33
+ * labels: {
34
+ * e: "f",
35
+ * g: "h",
36
+ * },
37
+ * isPaused: false,
38
+ * datas: [
39
+ * {
40
+ * refId: "A",
41
+ * queryType: "",
42
+ * relativeTimeRange: {
43
+ * from: 600,
44
+ * to: 0,
45
+ * },
46
+ * datasourceUid: "PD8C576611E62080A",
47
+ * model: JSON.stringify({
48
+ * hide: false,
49
+ * intervalMs: 1000,
50
+ * maxDataPoints: 43200,
51
+ * refId: "A",
52
+ * }),
53
+ * },
54
+ * {
55
+ * refId: "B",
56
+ * queryType: "",
57
+ * relativeTimeRange: {
58
+ * from: 0,
59
+ * to: 0,
60
+ * },
61
+ * datasourceUid: "-100",
62
+ * model: `{
63
+ * "conditions": [
64
+ * {
65
+ * "evaluator": {
66
+ * "params": [
67
+ * 3
68
+ * ],
69
+ * "type": "gt"
70
+ * },
71
+ * "operator": {
72
+ * "type": "and"
73
+ * },
74
+ * "query": {
75
+ * "params": [
76
+ * "A"
77
+ * ]
78
+ * },
79
+ * "reducer": {
80
+ * "params": [],
81
+ * "type": "last"
82
+ * },
83
+ * "type": "query"
84
+ * }
85
+ * ],
86
+ * "datasource": {
87
+ * "type": "__expr__",
88
+ * "uid": "-100"
89
+ * },
90
+ * "hide": false,
91
+ * "intervalMs": 1000,
92
+ * "maxDataPoints": 43200,
93
+ * "refId": "B",
94
+ * "type": "classic_conditions"
95
+ * }
96
+ * `,
97
+ * },
98
+ * ],
99
+ * }],
100
+ * });
101
+ * ```
102
+ *
103
+ * ## Import
104
+ *
105
+ * ```sh
106
+ * $ pulumi import grafana:index/ruleGroup:RuleGroup rule_group_name {{folder_uid}};{{rule_group_name}}
107
+ * ```
108
+ */
109
+ export declare class RuleGroup extends pulumi.CustomResource {
110
+ /**
111
+ * Get an existing RuleGroup resource's state with the given name, ID, and optional extra
112
+ * properties used to qualify the lookup.
113
+ *
114
+ * @param name The _unique_ name of the resulting resource.
115
+ * @param id The _unique_ provider ID of the resource to lookup.
116
+ * @param state Any extra arguments used during the lookup.
117
+ * @param opts Optional settings to control the behavior of the CustomResource.
118
+ */
119
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RuleGroupState, opts?: pulumi.CustomResourceOptions): RuleGroup;
120
+ /**
121
+ * Returns true if the given object is an instance of RuleGroup. This is designed to work even
122
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
123
+ */
124
+ static isInstance(obj: any): obj is RuleGroup;
125
+ /**
126
+ * The UID of the folder that the group belongs to.
127
+ */
128
+ readonly folderUid: pulumi.Output<string>;
129
+ /**
130
+ * The interval, in seconds, at which all rules in the group are evaluated. If a group contains many rules, the rules are evaluated sequentially.
131
+ */
132
+ readonly intervalSeconds: pulumi.Output<number>;
133
+ /**
134
+ * The name of the alert rule.
135
+ */
136
+ readonly name: pulumi.Output<string>;
137
+ /**
138
+ * The ID of the org to which the group belongs.
139
+ */
140
+ readonly orgId: pulumi.Output<string>;
141
+ /**
142
+ * The rules within the group.
143
+ */
144
+ readonly rules: pulumi.Output<outputs.RuleGroupRule[]>;
145
+ /**
146
+ * Create a RuleGroup resource with the given unique name, arguments, and options.
147
+ *
148
+ * @param name The _unique_ name of the resource.
149
+ * @param args The arguments to use to populate this resource's properties.
150
+ * @param opts A bag of options that control this resource's behavior.
151
+ */
152
+ constructor(name: string, args: RuleGroupArgs, opts?: pulumi.CustomResourceOptions);
153
+ }
154
+ /**
155
+ * Input properties used for looking up and filtering RuleGroup resources.
156
+ */
157
+ export interface RuleGroupState {
158
+ /**
159
+ * The UID of the folder that the group belongs to.
160
+ */
161
+ folderUid?: pulumi.Input<string>;
162
+ /**
163
+ * The interval, in seconds, at which all rules in the group are evaluated. If a group contains many rules, the rules are evaluated sequentially.
164
+ */
165
+ intervalSeconds?: pulumi.Input<number>;
166
+ /**
167
+ * The name of the alert rule.
168
+ */
169
+ name?: pulumi.Input<string>;
170
+ /**
171
+ * The ID of the org to which the group belongs.
172
+ */
173
+ orgId?: pulumi.Input<string>;
174
+ /**
175
+ * The rules within the group.
176
+ */
177
+ rules?: pulumi.Input<pulumi.Input<inputs.RuleGroupRule>[]>;
178
+ }
179
+ /**
180
+ * The set of arguments for constructing a RuleGroup resource.
181
+ */
182
+ export interface RuleGroupArgs {
183
+ /**
184
+ * The UID of the folder that the group belongs to.
185
+ */
186
+ folderUid: pulumi.Input<string>;
187
+ /**
188
+ * The interval, in seconds, at which all rules in the group are evaluated. If a group contains many rules, the rules are evaluated sequentially.
189
+ */
190
+ intervalSeconds: pulumi.Input<number>;
191
+ /**
192
+ * The name of the alert rule.
193
+ */
194
+ name?: pulumi.Input<string>;
195
+ /**
196
+ * The ID of the org to which the group belongs.
197
+ */
198
+ orgId: pulumi.Input<string>;
199
+ /**
200
+ * The rules within the group.
201
+ */
202
+ rules: pulumi.Input<pulumi.Input<inputs.RuleGroupRule>[]>;
203
+ }