Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide consistency across data sources in terms of case sensitivity #253

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
17 changes: 13 additions & 4 deletions docs/data-sources/backup_unit.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ description: |-

The **Backup Unit data source** can be used to search for and return an existing Backup Unit.
You can provide a string for either id or name parameters which will be compared with provisioned Backup Units.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search and make sure that your resources have unique names.

## Example Usage

Expand All @@ -30,14 +30,23 @@ data "ionoscloud_backup_unit" "example" {
}
```

### By Name with Partial Match
```hcl
data "ionoscloud_backup_unit" "example" {
name = "Example"
partial_match = true
}
```

## Argument Reference

The following arguments are supported:

* `name` - (Optional) Name of an existing backup unit that you want to search for.
* `id` - (Optional) ID of the backup unit you want to search for.
* `name` - (Optional) Name of an existing backup unit that you want to search for. Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true.
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.

Either `name` or `id` must be provided. If none, or both are provided, the datasource will return an error.
Either `id` or `name` must be provided. If none, or both are provided, the datasource will return an error.

## Attributes Reference

Expand Down
17 changes: 14 additions & 3 deletions docs/data-sources/datacenter.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ description: |-
The **Datacenter data source** can be used to search for and return an existing Virtual Data Center.
You can provide a string for the name and location parameters which will be compared with provisioned Virtual Data Centers.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.
When this happens, please refine your search and make sure that your resources have unique names.


## Example Usage

Expand All @@ -31,13 +32,23 @@ data "ionoscloud_datacenter" "example" {
}
```

### By Name & Location with Partial Match
```hcl
data "ionoscloud_datacenter" "example" {
name = "Datacenter"
location = "us/las"
partial_match = true
}
```

## Argument Reference

* `id` - (Optional) Id of an existing Virtual Data Center that you want to search for.
* `name` - (Optional) Name of an existing Virtual Data Center that you want to search for.
* `name` - (Optional) Name of an existing Virtual Data Center that you want to search for.Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true..
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.
* `location` - (Optional) Id of the existing Virtual Data Center's location.

Either `name`, `location` or `id` must be provided. If none, the datasource will return an error.
Either `id`, `location` or `name` must be provided. If none, the datasource will return an error.

## Attributes Reference

Expand Down
17 changes: 13 additions & 4 deletions docs/data-sources/dbaas_pgsql_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: |-

The **DbaaS Postgres Cluster data source** can be used to search for and return an existing DbaaS Postgres Cluster.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.
When this happens, please refine your search and make sure that your resources have unique names.

## Example Usage

Expand All @@ -26,16 +26,25 @@ data "ionoscloud_pg_cluster" "example" {

```hcl
data "ionoscloud_pg_cluster" "example" {
display_name = "PostgreSQL_cluster"
display_name = "PostgreSQL_Example"
}
```

### By Name with Partial Match

```hcl
data "ionoscloud_pg_cluster" "example" {
display_name = "_Example"
}
```

## Argument Reference

* `display_name` - (Optional) Display name or an existing cluster that you want to search for.
* `id` - (Optional) ID of the cluster you want to search for.
* `display_name` - (Optional) Display name or an existing cluster that you want to search for. Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true..
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.

Either `display_name` or `id` must be provided. If none, or both are provided, the datasource will return an error.
Either `id` or `display_name` must be provided. If none, or both are provided, the datasource will return an error.

## Attributes Reference

Expand Down
23 changes: 18 additions & 5 deletions docs/data-sources/firewall.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ description: |-

The **Firewall data source** can be used to search for and return an existing FirewallRules.
You can provide a string for either id or name parameters which will be compared with provisioned Firewall Rules.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search and make sure that your resources have unique names.

## Example Usage

### By ID
```hcl
data "ionoscloud_firewall" "example" {
Expand All @@ -31,21 +32,33 @@ data "ionoscloud_firewall" "example" {
datacenter_id = <datacenter_id>
server_id = <server_id>
nic_id = <nic_id>
name = "test_ds_firewall_rule"
name = "Firewall Rule Example"
}
```

### By Name with Partial Match
```hcl
data "ionoscloud_firewall" "example" {
datacenter_id = <datacenter_id>
server_id = <server_id>
nic_id = <nic_id>
name = "Firewall"
partial_match = true
}
```

## Argument Reference

The following arguments are supported:

* `name` - (Optional) Name of an existing firewall rule that you want to search for.
* `id` - (Optional) ID of the firewall rule you want to search for.
* `name` - (Optional) Name of an existing firewall rule that you want to search for. Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true..
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.
* `datacenter_id` - (Required) The Virtual Data Center ID.
* `server_id` - (Required) The Server ID.
* `nic_id` - (Required) The NIC ID.

Either `name` or `id` must be provided. If none, or both are provided, the datasource will return an error.
Either `id` or `name` must be provided. If none, or both are provided, the datasource will return an error.

## Attributes Reference

Expand Down
17 changes: 13 additions & 4 deletions docs/data-sources/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ description: |-
# ionoscloud\_group

The **Group data source** can be used to search for and return existing groups.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search and make sure that your resources have unique names.

## Example Usage

Expand All @@ -29,12 +29,21 @@ data "ionoscloud_group" "example" {
}
```

### By Name with Partial Match
```hcl
data "ionoscloud_group" "example" {
name = "Group"
partial_match = true
}
```

## Argument Reference

* `name` - (Optional) Name of an existing group that you want to search for.
* `id` - (Optional) ID of the group you want to search for.
* `name` - (Optional) Name of an existing group that you want to search for. Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true..
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.

Either `name` or `id` must be provided. If none, or both are provided, the datasource will return an error.
Either `id` or `name` must be provided. If none, or both are provided, the datasource will return an error.

## Attributes Reference

Expand Down
17 changes: 7 additions & 10 deletions docs/data-sources/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,27 @@ description: |-
# ionoscloud\_image

The **Image data source** can be used to search for and return an existing image which can then be used to provision a server.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.

## Example Usage

```hcl
data "ionoscloud_image" "example" {
name = "ubuntu"
type = "CDROM"
location = "de/fkb"
cloud_init = "NONE"
name = "debian-10-genericcloud"
partial_match = true
type = "HDD"
cloud_init = "V1"
location = "us/las"
}
```

## Argument Reference

* `name` - (Required) Name of an existing image that you want to search for.
* `name` - (Required) Name of an existing image that you want to search for. Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true..
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.
* `location` - (Optional) Id of the existing image's location.
* `type` - (Optional) The image type, HDD or CD-ROM.
* `cloud_init` - (Optional) Cloud init compatibility ("NONE" or "V1")

If both "name" and "version" are provided the plugin will concatenate the two strings in this format [name]-[version].

## Attributes Reference

* `id` - UUID of the image
Expand All @@ -54,4 +52,3 @@ If both "name" and "version" are provided the plugin will concatenate the two st
* `image_aliases` - List of image aliases mapped for this Image
* `cloud_init` - Cloud init compatibility
* `type` - This indicates the type of image
* `location` - Location of that image/snapshot.
15 changes: 12 additions & 3 deletions docs/data-sources/ipblock.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: |-
The **IP Block data source** can be used to search for and return an existing Ip Block.
You can provide a string for the id, the name or the location parameters which will be compared with the provisioned Ip Blocks.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.
When this happens, please refine your search and make sure that your resources have unique names.

## Example Usage

Expand All @@ -26,7 +26,15 @@ data "ionoscloud_ipblock" "example" {
### By Name
```hcl
data "ionoscloud_ipblock" "example" {
name = "IP Block Name"
name = "IP Block Example"
}
```

### By Name with Partial Match
```hcl
data "ionoscloud_ipblock" "example" {
name = "Example"
partial_match = true
}
```

Expand All @@ -48,7 +56,8 @@ data "ionoscloud_ipblock" "example" {
## Argument reference

* `id` - (Optional) ID of an existing Ip Block that you want to search for.
* `name` - (Optional) Name of an existing Ip Block that you want to search for.
* `name` - (Optional) Name of an existing Ip Block that you want to search for. Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true..
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.
* `location` - (Optional) The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.

## Attributes Reference
Expand Down
16 changes: 13 additions & 3 deletions docs/data-sources/k8s_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ description: |-
# ionoscloud\_k8s\_cluster

The **k8s Cluster data source** can be used to search for and return existing k8s clusters.
You can provide a string for either id or name parameters which will be compared with provisioned K8s Clusters.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.
When this happens, please refine your search and make sure that your resources have unique names.

## Example Usage
### By ID
Expand All @@ -28,12 +29,21 @@ data "ionoscloud_k8s_cluster" "example" {
}
```

### By Name with Partial Match
```hcl
data "ionoscloud_k8s_cluster" "example" {
name = "Example"
partial_match = true
}
```

## Argument Reference

* `name` - (Optional) Name or an existing cluster that you want to search for.
* `id` - (Optional) ID of the cluster you want to search for.
* `name` - (Optional) Name or an existing cluster that you want to search for. Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true..
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.

Either `name` or `id` must be provided. If none, or both are provided, the datasource will return an error.
Either `id` or `name` must be provided. If none, or both are provided, the datasource will return an error.

## Attributes Reference

Expand Down
17 changes: 14 additions & 3 deletions docs/data-sources/k8s_node_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ description: |-
# ionoscloud\_k8s\_node\_pool

The **k8s Node Pool** data source can be used to search for and return existing k8s Node Pools.
You can provide a string for either id or name parameters which will be compared with provisioned K8s Node Pools.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.
When this happens, please refine your search and make sure that your resources have unique names.

## Example Usage

Expand All @@ -31,13 +32,23 @@ data "ionoscloud_k8s_node_pool" "example" {
}
```

### By Name with Partial Match
```hcl
data "ionoscloud_k8s_node_pool" "example" {
k8s_cluster_id = <k8s_cluster_id>
name = "Example"
partial_match = true
}
```

## Argument Reference

* `k8s_cluster_id` (Required) K8s Cluster' UUID
* `name` - (Optional) Name of an existing node pool that you want to search for.
* `id` - (Optional) ID of the node pool you want to search for.
* `name` - (Optional) Name of an existing node pool that you want to search for. Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true..
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.

`k8s_cluster_id` and either `name` or `id` must be provided. If none, or both of `name` and `id` are provided, the datasource will return an error.
`k8s_cluster_id` and either `id` or `name` must be provided. If none, or both of `name` and `id` are provided, the datasource will return an error.

## Attributes Reference

Expand Down
18 changes: 14 additions & 4 deletions docs/data-sources/lan.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: |-

The **LAN data source** can be used to search for and return existing lans.
If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned.
When this happens, please refine your search string so that it is specific enough to return only one result.
When this happens, please refine your search and make sure that your resources have unique names.

## Example Usage

Expand All @@ -27,17 +27,27 @@ data "ionoscloud_lan" "example" {
```hcl
data "ionoscloud_lan" "example" {
datacenter_id = <datacenter_id>
name = <Lan Example>
name = "Lan Example"
}
```

### By Name with Partial Match
```hcl
data "ionoscloud_lan" "example" {
datacenter_id = <datacenter_id>
name = "Example"
partial_match = true
}
```

## Argument Reference

* `datacenter_id` - (Required) Datacenter's UUID.
* `name` - (Optional) Name of an existing lan that you want to search for.
* `id` - (Optional) ID of the lan you want to search for.
* `name` - (Optional) Name of an existing lan that you want to search for. Search by name is case-insensitive. The whole resource name is required if `partial_match` parameter is not set to true..
* `partial_match` - (Optional) Whether partial matching is allowed or not when using name argument. Default value is false.

`datacenter_id` and either `name` or `id` must be provided. If none, or both of `name` and `id` are provided, the datasource will return an error.
`datacenter_id` and either `id` or `name` must be provided. If none, or both of `name` and `id` are provided, the datasource will return an error.

## Attributes Reference

Expand Down
Loading