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

Weird behavior of 'title' and 'name' for dashboards created using sumologic_content #356

Open
mccartney opened this issue Mar 23, 2022 · 3 comments

Comments

@mccartney
Copy link
Contributor

mccartney commented Mar 23, 2022

Steps to reproduce

  1. Define a dashboard whose title and name do not match, e.g.
data "sumologic_personal_folder" "personalFolder" {}


resource "sumologic_content" "crazy_dashboard" {
  parent_id = data.sumologic_personal_folder.personalFolder.id
  config =<<EOF
{
    "type": "DashboardV2SyncDefinition",
    "name": "An empty dashboard",
    "description": "",
    "title": "Not that empty",
    "theme": "Light",
    "topologyLabelMap": {
        "data": {}
    },
    "refreshInterval": 0,
    "timeRange": {
        "type": "BeginBoundedTimeRange",
        "from": {
            "type": "RelativeTimeRangeBoundary",
            "relativeTime": "-15m"
        },
        "to": null
    },
    "layout": {
        "layoutType": "Grid",
        "layoutStructures": [
            {
                "key": "panelPANE-D2CBAAB9AF97884F",
                "structure": "{\"height\":6,\"width\":12,\"x\":0,\"y\":0,\"minHeight\":1,\"minWidth\":1}"
            }
        ]
    },
    "panels": [
        {
            "id": null,
            "key": "panelPANE-D2CBAAB9AF97884F",
            "title": "text 1",
            "visualSettings": "{\"general\":{\"mode\":\"TextPanel\",\"type\":\"text\",\"displayType\":\"default\"},\"title\":{\"fontSize\":14},\"text\":{\"format\":\"markdownV2\"},\"series\":{},\"legend\":{\"enabled\":false}}",
            "keepVisualSettingsConsistentWithParent": true,
            "panelType": "TextPanel",
            "text": ""
        }
    ],
    "variables": [],
    "coloringRules": []
}
  1. Run terraform apply once
  2. Open the dashboard in the UI (I know it sounds weird, but without this step, the symptoms are different)
  3. Run terraform apply again with no changes

Observed

It errors out on the second and any subsequent apply with:

Error: Failed - {content1:duplicate_element Content:: Content with same name already exists. Name = Not that empty & Existing Parent ID = 14205149 }

Expected

  • Some consistent behavior
  • Maybe just remove one of the fields?
@mccartney mccartney added the bug label Mar 23, 2022
@mccartney
Copy link
Contributor Author

I suspect this might be related to: #328

@pbaroni
Copy link

pbaroni commented Jan 19, 2023

This affected our project as well, even without the
3. Open the dashboard in the UI (I know it sounds weird, but without this step, the symptoms are different) step.

Workaround was to manually set the identical value to title and name fields.

@mccartney
Copy link
Contributor Author

#673 is related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants