HashiCorp Cloud Platform
Create and manage actions
This page describes how to create HCP Waypoint actions and attach them to HCP Waypoint templates and applications. Platform engineers often perform these tasks. Refer to Actions for additional information.
Prerequisites
- An HCP account with HCP Waypoint enabled. Refer to HCP Account for information about creating an account.
Create an action
To create an action, complete the following steps:
- Sign into the HCP portal and click Waypoint in the Services menu.
- Click Actions in the sidebar, then click Create an action.
- Enter an Action name and Description for the action.
- Add values to the Variables field to create any required local variables for the action.
- Optionally, enable the Enable this value to be defined when the action is triggered option for each variable you want to choose a value for when you run the action. Refer to HCP Waypoint variables reference for more information.
- Choose an Action type and enter the associated configuration parameters.
- Click Create action.
You can choose from the following action types:
- Custom: This action type configures HCP Waypoint to send an HTTP request to the specified source URL. The source URL cannot include a custom port.
- Agent: This action type runs on an HCP Waypoint agent that you manage. Refer to the create and manage agents documentation for more information.
For information on using variables in an action, refer to the action variables reference documentation.
Run an action
To run an action, complete the following steps:
- Sign into the HCP portal and click Waypoint in the Services menu.
- Click Actions in the sidebar, then click on the name of the action you want to run.
- Click Run.
Delete an action
To delete an action, complete the following steps:
- Sign into the HCP portal and click Waypoint in the Services menu.
- Click Actions in the sidebar, then open the ellipses menu under the Manage heading for the action you want to delete.
- Click Delete action.
- Enter DELETE in the form and click Delete.
Assign an action to a template
To assign or unassign an action to a template, complete the following steps:
- Sign into the HCP portal and click Waypoint in the Services menu.
- Click Templates in the sidebar, then click on the name of a template.
- In the sidebar, click Settings then click Action assignments.
- Enable the actions you want to assign to the template and deselect any actions you want unassign.
- Click Confirm.
Run an action assigned to an application
Applications inherit any actions assigned to the template they are created from. To run an action assigned to an application, complete the following steps:
- Sign into the HCP portal and click Waypoint in the Services menu.
- Click Applications in the sidebar, then click on the name of an application.
- Click Actions, then click on the name of the action you want to run.
- Click Run.
View action run history
To view an action's run history, complete the following steps:
- Sign into the HCP portal and click Waypoint in the Services menu.
- Click Actions in the sidebar, then click on the name of an action.
View action run history for an application
To view an action's run history for an application, complete the following steps:
- Sign into the HCP portal and click Waypoint in the Services menu.
- Click Applications in the sidebar, then click on the name of an application.
- Click Action runs in the sidebar.
Next steps
To learn more about what you can do with HCP Waypoint after you created an action, refer to the following topics: