Cloud Region Management
The Ash Console is currently in beta and not production-ready. It is under active development and subject to breaking changes.
The resources of a project are deployed across one or more cloud regions.
The Ash Console alpha supports AWS, Azure, and Google Cloud.
Cloud regions live under a project. To manage cloud regions, you need to have at least one project.
See Project Management.
List a project's cloud regions
- Using the Ash Console
- Using the Ash CLI
- Using the Ash Console API
To list a project's cloud regions, navigate to the project's page and click on the Cloud Regions
tab.
The Ash CLI displays information in a table format by default. To get a more detailed output (or for scripting), use the --json
flag.
To list secrets you have access to, run:
ash console region list
Cloud regions of project 'my-devnet-project':
+--------------+-----------+-----------------------+------------+--------+
| Cloud region | Region ID | Cloud creds secret ID | Created at | Status |
+==============+===========+=======================+============+========+
+--------------+-----------+-----------------------+------------+--------+
See Authentication for more information on how to get an access token.
The secret API endpoint is /project/${projectId}/regions
.:
curl https://api.console.ash.center/projects/e05f4f15-f5ca-4ac7-b38c-0726e256c70b/regions \
-H "Authorization: Bearer ${access_token}"
[]
Add a cloud region to a project
Prior to adding a cloud region, you need to create a cloud credentials secret. See Cloud Credentials for how to create appropriate credentials for each cloud provider.
You can also provide the cloud credentials secret name instead of its ID in the cloudCredentialsSecretId
field.
- Using the Ash Console
- Using the Ash CLI
- Using the Ash Console API
From the Ash Console project overview page, navigate to the Cloud Regions tab:
- Click on the
Add Cloud Region
button. - Select the cloud provider and region you want to use (see list of supported regions).
- Select a cloud credentials secret.
- Click on the
Create
button to add the cloud region to the project.
To add a cloud region to the current project, use the region add
command and provide the required secret properties as JSON:
ash console region add '{cloudProvider: google, region: europe-west1, cloudCredentialsSecretId: c705551e-d74d-4d59-9010-4c9432394aa1}'
Cloud region successfully added to project 'my-devnet-project'!
+---------------------+-------------+-----------------------+------------------+-----------+
| Cloud region | Region ID | Cloud creds secret ID | Created at | Status |
+=====================+=============+=======================+==================+===========+
| google/europe-west1 | 9e28...3164 | c705...4aa1 | 2024-04-04T15:53 | Available |
+---------------------+-------------+-----------------------+------------------+-----------+
Use ash console region available
to get the list of regions available for each cloud provider.
To create a new secret, you have to send a POST
request with the required secret properties as JSON:
curl -X POST https://api.console.ash.center/projects/e05f4f15-f5ca-4ac7-b38c-0726e256c70b/regions \
-H "Authorization: Bearer ${access_token}" \
-H "Content-Type: application/json" \
-d '{"cloudProvider": "google", "region": "europe-west1", "cloudCredentialsSecretId": "c705551e-d74d-4d59-9010-4c9432394aa1"}'
{
"id": "9a1a3837-bf36-462b-9671-93f525284b95",
"cloudProvider": "google",
"region": "europe-west1",
"cloudCredentialsSecretId": "c705551e-d74d-4d59-9010-4c9432394aa1",
"status": "available",
"ownerId": "4d4dee2d-e943-432c-91ee-678975615caa",
"projectId": "e05f4f15-f5ca-4ac7-b38c-0726e256c70b",
"created": "2024-04-04T15:58:33.636264",
"name": "google/europe-west1"
}
Use the /regions
endpoint to get the list of regions available for each cloud provider.
Remove a cloud region from a project
Removing a region from a project will recursively delete all the resources that belong to it!
Removing a cloud region is not instantaneous. The cloud region will be in status destroying
for a few seconds/minutes before it is completely removed.
- Using the Ash Console
- Using the Ash CLI
- Using the Ash Console API
From the Cloud Regions
tab of the project, click on the ...
and then Delete
button of the cloud region:
The CLI will ask for confirmation before deleting the secret. To skip the confirmation, use the --yes
flag.
ash console region remove google/europe-west1
Region 'google/europe-west1' of project 'my-devnet-project':
+---------------------+-------------+-----------------------+------------------+-----------+
| Cloud region | Region ID | Cloud creds secret ID | Created at | Status |
+=====================+=============+=======================+==================+===========+
| google/europe-west1 | d072...eb29 | c705...4aa1 | 2024-04-04T16:05 | Available |
+---------------------+-------------+-----------------------+------------------+-----------+
> Are you sure you want to remove this region? Yes
Cloud region removed successfully!
The /
in the region name is replaced with _
in the API endpoint:
curl -X DELETE https://api.console.ash.center/projects/e05f4f15-f5ca-4ac7-b38c-0726e256c70b/regions/europe_west1 \
-H "Authorization: Bearer ${access_token}"
{
"id": "9a1a3837-bf36-462b-9671-93f525284b95",
"cloudProvider": "google",
"region": "europe-west1",
"cloudCredentialsSecretId": "c705551e-d74d-4d59-9010-4c9432394aa1",
"status": "available",
"ownerId": "4d4dee2d-e943-432c-91ee-678975615caa",
"projectId": "e05f4f15-f5ca-4ac7-b38c-0726e256c70b",
"created": "2024-04-04T15:58:33.636264",
"name": "google/europe-west1"
}