Skip to content

Commit 155a33e

Browse files
authored
Merge branch 'main' into suntala/migrate-grafana_playlist
2 parents 7118432 + c1d1c33 commit 155a33e

27 files changed

+7184
-108
lines changed

.github/workflows/acc-tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ jobs:
8181
type: ['oss']
8282
subset: ['basic', 'other', 'long']
8383
include:
84+
# Run Git Sync only on Grafana main so we can cover provisioning APIs that
85+
# are not released yet without pulling the entire OSS "other" suite onto
86+
# an unreleased Grafana build.
87+
- version: 'main'
88+
type: 'oss'
89+
subset: 'provisioning'
8490
- version: '12.3.4'
8591
type: 'oss'
8692
subset: examples
@@ -159,10 +165,12 @@ jobs:
159165
command: make testacc-${{ matrix.type }}-docker
160166
env:
161167
GRAFANA_VERSION: ${{ matrix.version }}
168+
GF_FEATURE_TOGGLES_ENABLE: ${{ matrix.subset == 'provisioning' && 'nestedFolders,ssoSettingsApi,ssoSettingsSAML,ssoSettingsLDAP,grafanaManagedRecordingRulesDatasources,enableSCIM,alertEnrichmentMultiStep,alertEnrichmentConditional,alertingEnrichmentAssistantInvestigations,provisioning,secretsManagementAppPlatform,secretsManagementAppPlatformUI,grafanaAPIServerWithExperimentalAPIs,secretsManagementAppPlatformAwsKeeper' || '' }}
162169
TESTARGS: >-
163170
${{ matrix.subset == 'enterprise' && '-skip="TestAccGenerate" -parallel 2' || '' }}
164171
${{ matrix.subset == 'basic' && '-run=".*_basic" -short -parallel 2' || '' }}
165172
${{ matrix.subset == 'other' && '-skip=".*_basic" -short -parallel 2' || '' }}
166173
${{ matrix.subset == 'long' && '-run=".*longtest" -parallel 1' || '' }}
167174
${{ matrix.subset == 'examples' && '-run=".*Examples" -parallel 1' || '' }}
168175
${{ matrix.subset == 'generate' && '-run="TestAccGenerate" -parallel 1' || '' }}
176+
${{ matrix.subset == 'provisioning' && '-run="TestAccProvisioning" -parallel 1' || '' }}

.linkcheckerrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
[checking]
2+
# Throttle requests per host to avoid GitHub (and other) rate limits (429)
3+
# default is 10
4+
maxrequestspersecond=5
5+
16
[filtering]
27
checkextern=1
38
ignore=

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ services:
4040
- GF_SERVER_ROOT_URL=${GRAFANA_URL}
4141
- GF_ENTERPRISE_LICENSE_TEXT=${GF_ENTERPRISE_LICENSE_TEXT:-}
4242
- GF_SERVER_SERVE_FROM_SUB_PATH=${GF_SERVER_SERVE_FROM_SUB_PATH:-}
43-
- GF_FEATURE_TOGGLES_ENABLE=nestedFolders,ssoSettingsApi,ssoSettingsSAML,ssoSettingsLDAP,grafanaManagedRecordingRulesDatasources,enableSCIM,alertEnrichmentMultiStep,alertEnrichmentConditional,alertingEnrichmentAssistantInvestigations,secretsManagementAppPlatform,secretsManagementAppPlatformUI,grafanaAPIServerWithExperimentalAPIs,secretsManagementAppPlatformAwsKeeper
43+
- GF_FEATURE_TOGGLES_ENABLE=${GF_FEATURE_TOGGLES_ENABLE:-nestedFolders,ssoSettingsApi,ssoSettingsSAML,ssoSettingsLDAP,grafanaManagedRecordingRulesDatasources,enableSCIM,alertEnrichmentMultiStep,alertEnrichmentConditional,alertingEnrichmentAssistantInvestigations,secretsManagementAppPlatform,secretsManagementAppPlatformUI,grafanaAPIServerWithExperimentalAPIs,secretsManagementAppPlatformAwsKeeper}
4444
healthcheck:
4545
test: wget --no-verbose --tries=1 --spider http://0.0.0.0:3000/api/health || exit 1 # Use wget because older versions of Grafana don't have curl
4646
interval: 10s
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "grafana_apps_provisioning_connection_v0alpha1 Resource - terraform-provider-grafana"
4+
subcategory: "Grafana Apps"
5+
description: |-
6+
Manages Grafana Git Sync connections used by repositories for provider authentication.
7+
---
8+
9+
# grafana_apps_provisioning_connection_v0alpha1 (Resource)
10+
11+
Manages Grafana Git Sync connections used by repositories for provider authentication.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "grafana_apps_provisioning_connection_v0alpha1" "example" {
17+
metadata {
18+
uid = "my-github-connection"
19+
}
20+
21+
spec {
22+
title = "My GitHub App Connection"
23+
type = "github"
24+
url = "https://github.com"
25+
26+
github {
27+
app_id = "12345"
28+
installation_id = "67890"
29+
}
30+
}
31+
32+
secure {
33+
private_key = {
34+
create = "replace-me"
35+
}
36+
}
37+
secure_version = 1
38+
}
39+
```
40+
41+
<!-- schema generated by tfplugindocs -->
42+
## Schema
43+
44+
### Optional
45+
46+
> **NOTE**: [Write-only arguments](https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments) are supported in Terraform 1.11 and later.
47+
48+
- `metadata` (Block, Optional) The metadata of the resource. (see [below for nested schema](#nestedblock--metadata))
49+
- `options` (Block, Optional) Options for applying the resource. (see [below for nested schema](#nestedblock--options))
50+
- `secure` (Block, Optional) Sensitive credentials. Values are write-only and never stored in Terraform state. (see [below for nested schema](#nestedblock--secure))
51+
- `secure_version` (Number) Set this to 1 when using `secure`, then increment it to trigger re-application of secure values.
52+
- `spec` (Block, Optional) The spec of the resource. (see [below for nested schema](#nestedblock--spec))
53+
54+
### Read-Only
55+
56+
- `id` (String) The ID of the resource derived from UUID.
57+
58+
<a id="nestedblock--metadata"></a>
59+
### Nested Schema for `metadata`
60+
61+
Required:
62+
63+
- `uid` (String) The unique identifier of the resource.
64+
65+
Optional:
66+
67+
- `folder_uid` (String) The UID of the folder to save the resource in.
68+
69+
Read-Only:
70+
71+
- `annotations` (Map of String) Annotations of the resource.
72+
- `url` (String) The full URL of the resource.
73+
- `uuid` (String) The globally unique identifier of a resource, used by the API for tracking.
74+
- `version` (String) The version of the resource.
75+
76+
77+
<a id="nestedblock--options"></a>
78+
### Nested Schema for `options`
79+
80+
Optional:
81+
82+
- `overwrite` (Boolean) Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
83+
84+
85+
<a id="nestedblock--secure"></a>
86+
### Nested Schema for `secure`
87+
88+
Optional:
89+
90+
> **NOTE**: [Write-only arguments](https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments) are supported in Terraform 1.11 and later.
91+
92+
- `private_key` (Map of String, [Write-only](https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments)) Private key for GitHub App authentication.
93+
- `token` (Map of String, [Write-only](https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments)) Access token.
94+
95+
96+
<a id="nestedblock--spec"></a>
97+
### Nested Schema for `spec`
98+
99+
Required:
100+
101+
- `title` (String) Display name shown in the UI.
102+
- `type` (String) Connection provider type.
103+
104+
Optional:
105+
106+
- `description` (String) Connection description.
107+
- `github` (Block, Optional) GitHub App configuration. (see [below for nested schema](#nestedblock--spec--github))
108+
- `url` (String) Provider URL.
109+
110+
<a id="nestedblock--spec--github"></a>
111+
### Nested Schema for `spec.github`
112+
113+
Required:
114+
115+
- `app_id` (String) GitHub App ID.
116+
- `installation_id` (String) GitHub App installation ID.
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "grafana_apps_provisioning_repository_v0alpha1 Resource - terraform-provider-grafana"
4+
subcategory: "Grafana Apps"
5+
description: |-
6+
Manages Grafana Git Sync repositories for provisioning dashboards and related resources.
7+
---
8+
9+
# grafana_apps_provisioning_repository_v0alpha1 (Resource)
10+
11+
Manages Grafana Git Sync repositories for provisioning dashboards and related resources.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "grafana_apps_provisioning_repository_v0alpha1" "example" {
17+
metadata {
18+
uid = "my-github-repo"
19+
}
20+
21+
spec {
22+
title = "My GitHub Repository"
23+
type = "github"
24+
25+
workflows = ["write"]
26+
27+
sync {
28+
enabled = true
29+
target = "folder"
30+
interval_seconds = 60
31+
}
32+
33+
github {
34+
url = "https://github.com/example/grafana-dashboards"
35+
branch = "main"
36+
path = "grafana/"
37+
}
38+
}
39+
40+
secure {
41+
token = {
42+
create = "replace-me"
43+
}
44+
}
45+
secure_version = 1
46+
}
47+
```
48+
49+
<!-- schema generated by tfplugindocs -->
50+
## Schema
51+
52+
### Optional
53+
54+
> **NOTE**: [Write-only arguments](https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments) are supported in Terraform 1.11 and later.
55+
56+
- `metadata` (Block, Optional) The metadata of the resource. (see [below for nested schema](#nestedblock--metadata))
57+
- `options` (Block, Optional) Options for applying the resource. (see [below for nested schema](#nestedblock--options))
58+
- `secure` (Block, Optional) Sensitive credentials. Values are write-only and never stored in Terraform state. (see [below for nested schema](#nestedblock--secure))
59+
- `secure_version` (Number) Set this to 1 when using `secure`, then increment it to trigger re-application of secure values.
60+
- `spec` (Block, Optional) The spec of the resource. (see [below for nested schema](#nestedblock--spec))
61+
62+
### Read-Only
63+
64+
- `id` (String) The ID of the resource derived from UUID.
65+
66+
<a id="nestedblock--metadata"></a>
67+
### Nested Schema for `metadata`
68+
69+
Required:
70+
71+
- `uid` (String) The unique identifier of the resource.
72+
73+
Optional:
74+
75+
- `folder_uid` (String) The UID of the folder to save the resource in.
76+
77+
Read-Only:
78+
79+
- `annotations` (Map of String) Annotations of the resource.
80+
- `url` (String) The full URL of the resource.
81+
- `uuid` (String) The globally unique identifier of a resource, used by the API for tracking.
82+
- `version` (String) The version of the resource.
83+
84+
85+
<a id="nestedblock--options"></a>
86+
### Nested Schema for `options`
87+
88+
Optional:
89+
90+
- `overwrite` (Boolean) Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
91+
92+
93+
<a id="nestedblock--secure"></a>
94+
### Nested Schema for `secure`
95+
96+
Optional:
97+
98+
> **NOTE**: [Write-only arguments](https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments) are supported in Terraform 1.11 and later.
99+
100+
- `token` (Map of String, [Write-only](https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments)) Token for repository authentication.
101+
- `webhook_secret` (Map of String, [Write-only](https://developer.hashicorp.com/terraform/language/resources/ephemeral#write-only-arguments)) Webhook secret.
102+
103+
104+
<a id="nestedblock--spec"></a>
105+
### Nested Schema for `spec`
106+
107+
Required:
108+
109+
- `title` (String) Display name shown in the UI.
110+
- `type` (String) Repository provider type: local, github, git, bitbucket, or gitlab.
111+
112+
Optional:
113+
114+
- `bitbucket` (Block, Optional) Bitbucket repository configuration. (see [below for nested schema](#nestedblock--spec--bitbucket))
115+
- `connection` (Block, Optional) Connection resource reference. (see [below for nested schema](#nestedblock--spec--connection))
116+
- `description` (String) Repository description.
117+
- `git` (Block, Optional) Generic git repository configuration. (see [below for nested schema](#nestedblock--spec--git))
118+
- `github` (Block, Optional) GitHub repository configuration. (see [below for nested schema](#nestedblock--spec--github))
119+
- `gitlab` (Block, Optional) GitLab repository configuration. (see [below for nested schema](#nestedblock--spec--gitlab))
120+
- `local` (Block, Optional) Local filesystem repository configuration. (see [below for nested schema](#nestedblock--spec--local))
121+
- `sync` (Block, Optional) Sync configuration. (see [below for nested schema](#nestedblock--spec--sync))
122+
- `workflows` (List of String) Allowed change workflows: write, branch.
123+
124+
<a id="nestedblock--spec--bitbucket"></a>
125+
### Nested Schema for `spec.bitbucket`
126+
127+
Optional:
128+
129+
- `branch` (String) Branch to sync.
130+
- `path` (String) Optional subdirectory path.
131+
- `token_user` (String) Username for PAT auth.
132+
- `url` (String) Repository URL.
133+
134+
135+
<a id="nestedblock--spec--connection"></a>
136+
### Nested Schema for `spec.connection`
137+
138+
Optional:
139+
140+
- `name` (String) Connection resource name.
141+
142+
143+
<a id="nestedblock--spec--git"></a>
144+
### Nested Schema for `spec.git`
145+
146+
Optional:
147+
148+
- `branch` (String) Branch to sync.
149+
- `path` (String) Optional subdirectory path.
150+
- `token_user` (String) Username for PAT auth.
151+
- `url` (String) Repository URL.
152+
153+
154+
<a id="nestedblock--spec--github"></a>
155+
### Nested Schema for `spec.github`
156+
157+
Optional:
158+
159+
- `branch` (String) Branch to sync.
160+
- `generate_dashboard_previews` (Boolean) Whether to generate dashboard previews.
161+
- `path` (String) Optional subdirectory path.
162+
- `url` (String) Repository URL.
163+
164+
165+
<a id="nestedblock--spec--gitlab"></a>
166+
### Nested Schema for `spec.gitlab`
167+
168+
Optional:
169+
170+
- `branch` (String) Branch to sync.
171+
- `path` (String) Optional subdirectory path.
172+
- `url` (String) Repository URL.
173+
174+
175+
<a id="nestedblock--spec--local"></a>
176+
### Nested Schema for `spec.local`
177+
178+
Optional:
179+
180+
- `path` (String) Filesystem path.
181+
182+
183+
<a id="nestedblock--spec--sync"></a>
184+
### Nested Schema for `spec.sync`
185+
186+
Required:
187+
188+
- `enabled` (Boolean) Whether sync is enabled.
189+
- `target` (String) Sync target: instance or folder.
190+
191+
Optional:
192+
193+
- `interval_seconds` (Number) Sync interval in seconds.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
resource "grafana_apps_provisioning_connection_v0alpha1" "example" {
2+
metadata {
3+
uid = "my-github-connection"
4+
}
5+
6+
spec {
7+
title = "My GitHub App Connection"
8+
type = "github"
9+
url = "https://github.com"
10+
11+
github {
12+
app_id = "12345"
13+
installation_id = "67890"
14+
}
15+
}
16+
17+
secure {
18+
private_key = {
19+
create = "replace-me"
20+
}
21+
}
22+
secure_version = 1
23+
}

0 commit comments

Comments
 (0)