The data source values need to have more exposed fields to enable proper configuration.
As it stands now, the data sources for X-Ray, Cloudwatch, and Prometheus won't work out of the box only being able to provide the endpoint.
Here's an example change to a working prom datasource manually configured and having automation re-apply defined values.
# grafana_data_source.data_source_from_map["amp-us-east-1"] will be updated in-place
~ resource "grafana_data_source" "data_source_from_map" {
id = "1:8"
~ json_data_encoded = jsonencode(
~ {
- prometheusType = "Prometheus"
# (8 unchanged attributes hidden)
}
)
name = "amp-us-east-1"
~ url = "https://aps-workspaces.us-east-1.amazonaws.com/workspaces/<workspace id>/api/v1/query" -> "https://aps-workspaces.us-east-1.amazonaws.com/workspaces/<workspace id>/"
# (6 unchanged attributes hidden)
}
# grafana_data_source.data_source_from_map["aws-cw-us-east-1"] will be updated in-place
~ resource "grafana_data_source" "data_source_from_map" {
id = "1:9"
~ json_data_encoded = jsonencode(
~ {
- authType = "ec2_iam_role"
- defaultRegion = "us-east-1"
- logGroups = [
- {
- accountId = "<account id>"
- arn = "<arn>"
- name = "<name>"
},
]
# (8 unchanged attributes hidden)
}
)
name = "aws-cw-us-east-1"
# (7 unchanged attributes hidden)
}
````