Exporting Workflow Event History to GCS
Prerequisites
Before configuring the Export sink, please complete the following steps in Google Cloud.
- Create a GCS bucket and take note of its bucket name, for example, "test-export"
- Enable customer-managed encryption keys (CMEK) if you need additional security for your GCS bucket.
- For now we only support single region (or “Region” option when creating the bucket in GCS, not “Multi-Region” or “Dual-Region”)
- The region of the bucket has to be the same as the region of your Temporal Cloud Namespace.
- Record the GCP Project ID that owns the bucket.
- Create a service account in the same project that grants Temporal permission to write to your GCS bucket.
- Follow the instructions in the Temporal Cloud UI, there are two ways to set up this service account:
- Manual Setup:
- Input the service account ID, GCP project ID and GCS bucket name.
- Follow the instructions, manually set up a new service account.
- Automated Setup:
- Use the Terraform template to create the service account.
- Manual Setup:
Configure Workflow History Export
You can use either the Temporal Cloud UI or tcld to configure the Workflow History Export.
Using Temporal Cloud UI
The following steps guide you through setting up Workflow History Export using the Temporal Cloud UI.
- In the Cloud UI, navigate to the Namespaces section. Confirm that the Export feature is visible and properly displayed.
- Configure the Export sink for a Namespace:
- Choose GCS as the Sink type.
- Provide the following information:
- Name
- Service account ID
- GCP Project ID
- GCS bucket name
- After inputting the necessary values, click on Verify.
You should be able to write to the sink successfully.
If not, please fix any errors or reach out to support for help.
- If you just created the GCS bucket and granted the permission for your service account, it may take some time for it to populate the permission, thus, you may need to wait for several minutes (up to 5 minutes) then you can click the Verify button to verify the connection.
- Clicking Create will complete the Export sink set up
- The page will auto-refresh and you should see the status “Enabled” on the Export screen. You are now ready to export Workflow histories.
- You can toggle the enable button if you want to stop export and resume in the future. Note: when you re-enable the feature, it will start from the current point in time, and not from the time when you disabled export.
- You can also delete export by clicking Delete.
tip
Don't forget to click Create at the end of your setup to confirm your export.