-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config Generation: Omit org ID from Grafana resources
(If there's only one org being generated) If all resources are in the default org, there's no reason to have the `1:` prefix to all resources This makes resource names and IDs much nicer to look at
- Loading branch information
1 parent
cd47547
commit 502259e
Showing
17 changed files
with
72 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...plane/contact-point-1-email-receiver.yaml → ...ssplane/contact-point-email-receiver.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ssplane/dashboard-1-my-dashboard-uid.yaml → ...rossplane/dashboard-my-dashboard-uid.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rd-crossplane/folder-1-my-folder-uid.yaml → ...oard-crossplane/folder-my-folder-uid.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ssplane/notification-policy-1-policy.yaml → ...rossplane/notification-policy-policy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { | ||
to = grafana_dashboard._1_my-dashboard-uid | ||
id = "1:my-dashboard-uid" | ||
to = grafana_dashboard.my-dashboard-uid | ||
id = "my-dashboard-uid" | ||
} |
4 changes: 2 additions & 2 deletions
4
pkg/generate/testdata/generate/dashboard-filtered/resources.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
pkg/generate/testdata/generate/dashboard-json/imports.tf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
pkg/generate/testdata/generate/dashboard-restricted-permissions/imports.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { | ||
to = grafana_dashboard._0_my-dashboard-uid | ||
id = "0:my-dashboard-uid" | ||
to = grafana_dashboard.my-dashboard-uid | ||
id = "my-dashboard-uid" | ||
} | ||
|
||
import { | ||
to = grafana_folder._0_my-folder-uid | ||
id = "0:my-folder-uid" | ||
to = grafana_folder.my-folder-uid | ||
id = "my-folder-uid" | ||
} |
10 changes: 5 additions & 5 deletions
10
pkg/generate/testdata/generate/dashboard-restricted-permissions/resources.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# __generated__ by Terraform | ||
# Please review these resources and move them into your main configuration files. | ||
|
||
# __generated__ by Terraform from "0:my-dashboard-uid" | ||
resource "grafana_dashboard" "_0_my-dashboard-uid" { | ||
# __generated__ by Terraform from "my-dashboard-uid" | ||
resource "grafana_dashboard" "my-dashboard-uid" { | ||
config_json = jsonencode({ | ||
title = "My Dashboard" | ||
uid = "my-dashboard-uid" | ||
}) | ||
folder = grafana_folder._0_my-folder-uid.uid | ||
folder = grafana_folder.my-folder-uid.uid | ||
} | ||
|
||
# __generated__ by Terraform from "0:my-folder-uid" | ||
resource "grafana_folder" "_0_my-folder-uid" { | ||
# __generated__ by Terraform from "my-folder-uid" | ||
resource "grafana_folder" "my-folder-uid" { | ||
title = "My Folder" | ||
uid = "my-folder-uid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters