Is there any plans to create a stackdriver provider for monitoring ?
something similar to datadog's provider
Hi Fabrizio,
I believe @srivasta was working on this. @srivasta, can you post an update about your progress on this?
Thank you
friendly ping :D
I had started working with the stackdriver V3 API which was initially whitelist only. It has been published, so the work can be proceed now. I have a private branch that started working with it, but it is not yet complete. I should be able to get back to working on it next week (there is a work based exercise this week that is making availability sketchy)
Hi,
Any update on this? The StackDriver Monitoring v3 API is now in beta, and it would be cool to use it with Terraform.
Regards.
This would be a helpful provider to have.
that will be cool
Very excited to use this. Thanks @srivasta !
@srivasta are you still on this?
+1 Ping, inquiring minds want/need to use this feature in Terraform. :)
Hey all, this is currently being actively worked on. Stay tuned :)
I am very excited and eager to use this.
How is this going on? @danawillow
I hope you can tell when it is available.
Thank you so much again for your work 😃.
I'm excited too! We've had a few people working on this over its lifetime, which is why it's been taking so long. We do have someone assigned to it now, who I expect will be the person to finally finish it up. I'd expect the code to be ready within the next 2-3 weeks, but if it isn't, feel free to ping me for another update.
Hey @danawillow was wondering on an update. We have been watching this issue evolve and are quite excited to see how implementation works. I actually had a reminder set to hit y'all up :) Any news?
Thanks, good call! @sirgitsalot is working on this now, so he'll be able to give any future updates.
Looking forward to updates, and would happily test alpha/betas and provide feedback. :) Let us know!
Happy also to hear a bit of updates here for forecasting.
Sorry all, I was out on vacation last week and @Sirgitsalot is out all this week, so hopefully next week we'll have some news for you. #1967 is the first PR for this, which has some necessary prereqs.
needing this :).
Please refrain from adding comments that don't provide value, instead, prefer using reactions to show your support for an issue.
This avoids sending out an email, or otherwise generating a notification for everyone subscribed to a thread.

@SirGitsalot had to get pulled off, so I'll be working on this now.
The first resource is out here https://www.terraform.io/docs/providers/google/r/monitoring_alert_policy.html
I'll continue to add some of the others soon but I wanted to make sure to get alert policy in rather then let it get backed up behind several other resources.
The first resource is out here https://www.terraform.io/docs/providers/google/r/monitoring_alert_policy.html
I'll continue to add some of the others soon but I wanted to make sure to get alert policy in rather then let it get backed up behind several other resources.
@chrisst Thanks for the policy functionality!
Incase you would like some input on priority ; we would welcome the ability to add a project to a Stackdriver Workspace and the ability to create groups.
Stackdriver Groups: https://github.com/terraform-providers/terraform-provider-google/pull/2451
Stackdriver Notification Channels: https://github.com/terraform-providers/terraform-provider-google/pull/2452
All of the stackdriver monitoring resources that are available in the apis got released in v1.20.0 this morning. Closing this now, if there are new features or bugs please open new tickets.
Thanks, @chrisst!
@chrisst I don't see any documentation for creating log metrics via TF. Am I missing something?
@dannycohn I'm keeping this PR scoped to the stackdriver monitoring api as "stackdriver" is now a whole suite of different apis. Creating log metrics is under the logging.googleapis.com namespace so I didn't include it in these additions, but please file a new issue requesting it and we'll get to it as soon as we can!
@dannycohn I'm keeping this PR scoped to the stackdriver monitoring api as "stackdriver" is now a whole suite of different apis. Creating log metrics is under the logging.googleapis.com namespace so I didn't include it in these additions, but please file a new issue requesting it and we'll get to it as soon as we can!
Looks like one exists https://github.com/terraform-providers/terraform-provider-google/issues/1236
I updated the provider and gave it a go today. Unfortunately, the documentation on Terraform site has not been updated yet (at the time of writing), so I had to go back to the PRs and look up the resource descriptions there.
I was able to import the existing uptime checks and alerting policies, and reconcile the terraform view against the actual state. It looks like email notification channels are created ad hoc when editing the policy, but it was possible to pre-create them via terraform and reuse across a number of alerting policies.
The only snag is that after reapplying the alerting policies that used to have uptime checks in their conditions, these conditions are no longer recognised/displayed as uptime checks in the cloud console. Instead they look like ad hoc custom conditions. This is probably a Google Cloud thing, because I have done gcloud alpha monitoring policies list before and after applying terraform changes, and there are no differences in the conditions there.
@sergei-ivanov I added an uptime check and alert policy via the UI and imported them into TF but running apply (after I had resolved all the diffs) hasn't changed how the UI displays the alert policy. If you open a bug with sufficient repro steps and some screen shots I'd be happy to talk with the stack driver team and see if it's a bug upstream.
@chrisst have you tried changing it slightly before applying to force a change through the API? In my case the applied difference was in display name and the list of notifications (which resulted in an in-place modification). It was an old policy introduced a couple of months ago by hand, and I was eager to finally bring it under terraform. I'll try to set up a test policy manually tomorrow and see if I can reproduce the problem in my environment.
I have found out that if I set up an uptime check from scratch in the Cloud Console UI and import it into Terraform, then it is managed by Terraform just fine, and recognised as uptime check by Cloud Console UI. Apparently there's been some change in the way the uptime check maps into raw metrics filter, and retrofitting that change into the old filters in Terraform resulted in them being recognised as uptime checks in the UI again. So that seems to be a non-issue. I'll raise separate bugs / feature requests for other issues that I've found during my testing.
Thank you for a great piece of work!
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
Hey all, this is currently being actively worked on. Stay tuned :)