Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_dashboards: Create and share dashboards #3887

Closed
arunyenumula opened this issue Jul 19, 2019 · 7 comments · Fixed by #4357
Closed

azurerm_dashboards: Create and share dashboards #3887

arunyenumula opened this issue Jul 19, 2019 · 7 comments · Fixed by #4357

Comments

@arunyenumula
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Requesting Terraform support for creating and sharing dashboards.
Currently we have to use ARM templates.

New or Affected Resource(s)

  • azurerm_dashboard

Potential Terraform Configuration

# 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.

References

Create and share dashboards in Azure: https://docs.microsoft.com/en-us/azure/azure-portal/azure-portal-dashboards

@stuartleeks
Copy link
Contributor

@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 :-)

@damoodamoo
Copy link
Contributor

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:

  • the user populates a JSON block declaring the 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.
    e.g.:
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
  • we mimic the properties in the tf and the user re-keys the data. Nicer as it's more native-like in terraform and properties are inline, but potentially less nice for the user.
    e.g.:
 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?

@stuartleeks
Copy link
Contributor

@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?

@tombuildsstuff
Copy link
Contributor

@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?

@stuartleeks
Copy link
Contributor

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

@ghost
Copy link

ghost commented Oct 4, 2019

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 ...

@ghost
Copy link

ghost commented Mar 29, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants