Closed aelking closed 2 years ago
Hi! I'm having the same issue here. The only example provided at the documentation is for InfluxDB and Grafana's docs are not saying any further.
From scratching this repo I (wrongly) found some possible solutions for the required data to successfully configure the datasource. These are the results I got from that:
Error: grafana_data_source.azure_monitor: "secure_json_data.0.access_key": required field is not set
Error: grafana_data_source.azure_monitor: "secure_json_data.0.secret_key": required field is not set
Error: grafana_data_source.azure_monitor: json_data.0: invalid or unknown key: clientId
Error: grafana_data_source.azure_monitor: json_data.0: invalid or unknown key: subscriptionId
Error: grafana_data_source.azure_monitor: json_data.0: invalid or unknown key: tenantId
Error: grafana_data_source.azure_monitor: secure_json_data.0: invalid or unknown key: clientSecret```
We don't currently support Azure data sources, though this could absolutely be added with an accompanying library change.
I've created separate grafanads
provider to support every type of Grafana Datasource https://github.com/jwierzbo/terraform-provider-grafanads
Here is an example how to use it with custom mongo atlas datasource:
resource "grafanads_data_source_generic" "mongodbatlas" {
type = "grafana-mongodb-atlas-datasource"
name = "mongoatlas-datasource-provider-test"
json_data_string = {
atlasPublicKey = "XXX"
}
secure_json_string = {
atlasPrivateKey = "YYY"
}
}
@jwierzbo do you have sample for azure monitor and log analytics workspace as the data source? many thanks.
We don't currently support Azure data sources, though this could absolutely be added with an accompanying library change.
Hey @mlclmj is there any ETA on being able to fully configure the Azure Monitor data source fully via Terraform
@mlclmj Do you accept PRs?
Any progress on supporting this?
Is this gonna be applied someday? thanks
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Terraform v0.11.13
Affected Resource(s)
Please list the resources as a list, for example:
grafana_data_source
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
Expected Behavior
What should have happened? Grafana Azure Monitor Datasource should be created with the the Application Insights details filled in
Actual Behavior
What actually happened? Error about unknown keys
`Error: grafana_data_source.events: secure_json_data.0: invalid or unknown key: appInsightsApiKey
Error: grafana_data_source.events: secure_json_data.0: invalid or unknown key: appInsightsAppId`
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example: