> ## Documentation Index
> Fetch the complete documentation index at: https://docs-old.tilebox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# workflows.GetCurrentCluster

```go theme={"system"}
workflows.GetCurrentCluster(ctx context.Context) (string, error)
```

Get the current cluster slug.

This function is intended to be used in tasks.

## Returns

The current cluster slug.

```go Go theme={"system"}
type Task struct{}

func (t *Task) Execute(ctx context.Context) error {
	clusterSlug, err := workflows.GetCurrentCluster(ctx)
	if err != nil {
		return fmt.Errorf("failed to get current cluster: %w", err)
	}

	return nil
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.