Requesting Terraform support for creating and sharing dashboards.
Currently we have to use ARM templates.
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.
Create and share dashboards in Azure: https://docs.microsoft.com/en-us/azure/azure-portal/azure-portal-dashboards
@damoodamoo I think the preview label is because the GO SDK client is preview. I chatted with @tombuildsstuff earlier and got the go-ahead for working on this with the preview client. Let's sync :-)
Ok after chatting with @stuartleeks i'm going to continue work on this and he will guide/help when needed - this is my first work on this repo.
It feels like there are 2 approaches:
properties of the dashboard. This is nice as it's a copy+paste from the portal (where users will build the dashboards in the first place), but not nice in that it's a big JSON blob and we'd have to pass parameters in via another property like the ARM template resource.dashboard = <<DASHBOARD
"properties": {
"lenses": {
"0": {
"order": 0,
"parts": {
"0": {
"position": {
"x": 0,
"y": 0,
"rowSpan": 2,
"colSpan": 3
},
"metadata": {
"inputs": [],
"type": "Extension[azure]/HubsExtension/PartType/MarkdownPart",
"settings": {
"content": {
"settings": {
"content": "## My cool dashboard!",
...
}
DASHBOARD
properties {
lenses {
order = 0
parts {
partNo = 0
position {
x = 1
y = 2
...
}
}
}
}
Any thoughts on the recommended approach - or if i've missed a better way?
@tombuildsstuff - based on the discussion we had in #3316 I'm assuming that the preference is for the latter (i.e. HCL rather than JSON) - can you confirm?
@stuartleeks @damoodamoo cool thanks. Taking a look at this I think it's unlikely folks are going to write these dashboards by hand, instead I think it'd likely they'll build them in the portal and then reuse them across Subscriptions; as such I think we'd be better to expose a field which takes JSON here (which can be sourced from a file) - WDYT?
I agree that it's quite likely to not be hand generated from scratch! I suspect that a common workflow would be create in portal, export, tweak and clone sections etc
This has been released in version 1.35.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:
provider "azurerm" {
version = "~> 1.35.0"
}
# ... other configuration ...
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
I agree that it's quite likely to not be hand generated from scratch! I suspect that a common workflow would be create in portal, export, tweak and clone sections etc