Open kirk-b-hansen opened 1 year ago
We found the same thing but realised that when Grafana is provisioned it creates an SNS topic that is preconfigured as the SNS contact point (this was with v9.x).
If you're content to use the existing SNS topic that is created with Grafana then you can just reference it (perhaps use a
depends_on
block for a data resource for the topic).Ideally the grafana provider is updated to just have the contact point added.
Update: I've edited my comment here - Grafana does not automatically create an SNS topic - apologies for misleading folks here :pray:. We created the topic ourselves - then manually created the contact point within Grafana - it's important the it's prefixed with 'grafana' - as the roles in the docs use sns:grafana*
as their target.
@marcubus Was the SNS topic actually created?
When I created an AMG workspace (v9.4) with SNS notification channel enabled, it only creates a default contact point for SNS ("grafana-default-sns") but does not create an actual SNS topic. It only contains an example ARN:
Also in the docs, I don't find any indication that an SNS topic is actually created.
@tmszk - I've updated my comment above - you need to create an SNS topic with a name prefix of grafana
then you can set up your contact point here (ours was grafana_contact_point_topic
).
To reiterate - grafana does not automatically create a topic, nor does it create a topic automatically through the contact point page.
The AWS documentation recommends using Terraform to provision contact points. However, the
grafana_contact_point
resource does not support SNS. Since SNS is a supported contact point type in AWS Managed Grafana, and is in fact the contact point most consistent with AWS infrastructure, it should be provisionable using Terraform.