logicmonitor / terraform-provider-logicmonitor

Terraform LogicMonitor provider.
https://registry.terraform.io
Mozilla Public License 2.0
24 stars 16 forks source link

Using the Template Argument #76

Closed wellingk closed 3 months ago

wellingk commented 10 months ago

I have been trying to import a dashboard into Terraform using the Logic Monitor Terraform Provider.

I have exported the json template for the dashboard from the LogicMonitor Console and want to include that using the "template" argument.Which I guess is what we are supposed to do.

The Documentation for the LogicMonitor Terraform Provider is not very helpful.

Please can you tell me the correct Syntax to use to include the template?

Currently I am using:

template = file("${path.module}/templates/AWS_Custom_Billing_Dashboard_Using_Tag_Values.json")

to point at a file in the templates folder, and the output that I am receiving is: -

╷
│ Error: Incorrect attribute value type
│ 
│ on dashboard-aws-custom-billing-dashboards.tf line 30, in resource "logicmonitor_dashboard" "aws-billing-with-tag-values-dashboard":
│ 30: template = file("${path.module}/templates/AWS_Custom_Billing_Dashboard_Using_Tag_Values.json")
│ ├────────────────
│ │ path.module is "."
│ 
│ Inappropriate value for attribute "template": map of string required.
╵

Thanks for any assistance.

Kate

https://registry.terraform.io/providers/logicmonitor/logicmonitor/latest/docs/resources/dashboard_html

sivashankar-tomtom commented 1 month ago

I am also getting the same issue. I am using the logicmonitor version 2.0.17. Is this issue resolved?