Skip to content

Commit

Permalink
Add doc on ovh_cloud_region.
Browse files Browse the repository at this point in the history
  • Loading branch information
francois2metz committed Apr 27, 2024
1 parent 6ded8c2 commit c50ae28
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions docs/tables/ovh_cloud_region.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Table: ovh_cloud_region

Regions available for a cloud project.

The `ovh_cloud_region` table can be used to query information about regions and **you must specify which cloud project** in the where or join clause (`where project_id=`, `join ovh_cloud_project on id=`).

## Examples

### List regions of a cloud project

```sql
select
name,
type,
status
from
ovh_cloud_region
where
project_id='27c5a6d3dfez87893jfd88fdsfmvnqb8'
```

### List regions not UP

```sql
select
name
from
ovh_cloud_postgres
where
project_id='27c5a6d3dfez87893jfd88fdsfmvnqb8'
and status!='UP'
```

### Get specific region

```sql
select
name,
type,
status
from
ovh_cloud_region
where
project_id='27c5a6d3dfez87893jfd88fdsfmvnqb8'
and name='GRA'
```
2 changes: 1 addition & 1 deletion ovh/table_ovh_cloud_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func tableOvhCloudRegion() *plugin.Table {
return &plugin.Table{
Name: "ovh_cloud_region",
Description: "Cloud regions.",
Description: "Regions available for a cloud project.",
List: &plugin.ListConfig{
KeyColumns: plugin.SingleColumn("project_id"),
Hydrate: listRegion,
Expand Down

0 comments on commit c50ae28

Please sign in to comment.