Google Cloud Pub/Sub destinations let you export all of the flag evaluation and event data generated by LaunchDarkly SDKs into a Google Cloud Pub/Sub topic. This document will help you create a Google Cloud Pub/Sub destination.
In order for LaunchDarkly to send events to your Google Cloud Pub/Sub topic, you need to note the
topicId for the Google Cloud Pub/Sub topic to which you want us to publish. You can find this from the topic list.
After picking the topic, you can find the projectId and topicId.
Additionally, you need to grant LaunchDarkly's Google Cloud Service Account publish access to that topic. Follow these steps to enable this:
- In your Google Cloud Console, navigate to your Pub/Sub topic list. You should be able to access this list here.
- Once there, either select a topic using the checkboxes to the left of each topic name. Once you have made a selection, you should see some Permissions options on the right of the page.
- In the Add Members input field, copy/paste LaunchDarkly’s Service Account email:
- Click the Select a Role dropdown and choose Pub/Sub Publisher.
- Click Add.
You should now see our Service Account email as a Pub/Sub Publisher like this:
Verify you see the LaunchDarkly Service account email as a Pub/Sub Publisher.
Finally, we'll wire up this topic to LaunchDarkly. Navigate to the integrations page.
Click on the Google Cloud Pub/Sub card or the Add destination drop down
topicId as noted from Google Cloud. Choose an appropriate name and environment.
Send a test event to your topic