terrakube
terrakube copied to clipboard
Observability - Workspace Actions
Feature description 💡
Workspace actions will allow customers to extend the Terraform state to another level. Right now Terrakube creates a diagram based on the Terraform State:

However the idea is to provide useful actions to each resource directly from the Terrakube ui. Example:
- Restart a web app
- Open the resource in the azure portal or AWS console
- View the resource logs using open telemetry
- Access the grafana dashboard to monitor the resource
When the user select a resource in the diagram, and if the resource has a workspace action defined they will see the button to perform the action.
A drawer will appear on the right side with information about the resource and the defined workspaces actions on the resource
Workspace Actions are reusables pieces of code written in nodejs that can be share between the community. This can be shared via a registry or via a github repo. Nodejs has SDKs for the main cloud providers, so there will be unlimited possibilities of what you can define using . The function will receive a parameter context with all the variables inside the workspace, the global variables and with the information from the state for the specific resource selected. So the information in the terraform state will be useful to get the resource id and perform an action in that resource.
Then a customer can import the workspace action inside Terrakube.
A new endpoint will allow to define actions inside the organization
The following is an example of the table
Action Name: will be the name of the action that will appear in the UI button
Icon: Should be a SVG definition , this image will appear in the UI button
Function: A nodes functions that implement the logic to be executed when the action is triggered
Resource Type: The resource to apply this action.
Action name | Icon | Function | Action Type | Resource type |
---|---|---|---|---|
Restart Webapp | <SVG> | //nodejs logic here | UI | azurerm_app_service |
View in Azure | <SVG> | open( ‘https://portal.azure', function (err) { if ( err ) throw err; }); | UI | azurerm_% |
Check logs | //nodejs logic to check status here | Scheduled | azurerm_% |
Anything else?
No response