Skip to content

Commit

Permalink
Docs fix (#402)
Browse files Browse the repository at this point in the history
# Description

* Uses `terraform` as language in code blocks. This results in better
code highlighting in most renderers, including the one used on
registry.terraform.io. It is also the language hint used by default by
the docs framework.
* Fixes a number of broken links.

## Checklist
(For exoscale contributors)

* [ ] Changelog updated (under *Unreleased* block)
* [ ] Acceptance tests OK
* [ ] For a new resource, datasource or new attributes: acceptance test
added/updated

## Testing

<!--
Describe the tests you did
-->
  • Loading branch information
wdullaer authored Dec 17, 2024
1 parent fd3d75e commit 3805304
Show file tree
Hide file tree
Showing 42 changed files with 61 additions and 61 deletions.
4 changes: 2 additions & 2 deletions docs/data-sources/block_storage_volume_snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ subcategory: ""
description: |-
Fetch Exoscale Block Storage https://community.exoscale.com/documentation/block-storage/ Snapshot.
Block Storage offers persistent externally attached volumes for your workloads.
Corresponding resource: exoscaleblockstorage_snapshot ../resources/block_storage_snapshot.md.
Corresponding resource: exoscaleblockstorage_snapshot ../resources/block_storage_volume_snapshot.md.
---

# exoscale_block_storage_volume_snapshot (Data Source)
Expand All @@ -14,7 +14,7 @@ Fetch [Exoscale Block Storage](https://community.exoscale.com/documentation/bloc

Block Storage offers persistent externally attached volumes for your workloads.

Corresponding resource: [exoscale_block_storage_snapshot](../resources/block_storage_snapshot.md).
Corresponding resource: [exoscale_block_storage_snapshot](../resources/block_storage_volume_snapshot.md).



Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/database_uri.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Corresponding resource: [exoscale_database](../resources/database.md).

## Example Usage

```hcl
```terraform
resource "exoscale_database" "my_database" {
zone = "ch-gva-2"
name = "my-database"
Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/nlb_service_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Corresponding resource: [exoscale_nlb](../resources/nlb.md).

## Example Usage

```hcl
```terraform
data "exoscale_nlb_service_list" "example_nlb_services" {
name = "my-nlb"
}
Expand Down Expand Up @@ -44,7 +44,7 @@ directory for complete configuration examples.
### Read-Only

- `id` (String) The ID of this resource.
- `services` (Attributes List) The list of [exoscale_nlb_service](./nlb_service.md). (see [below for nested schema](#nestedatt--services))
- `services` (Attributes List) The list of [exoscale_nlb_service](./nlb_service_list.md). (see [below for nested schema](#nestedatt--services))

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/security_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ directory for complete configuration examples.

### Read-Only

- `external_sources` (Set of String) The list of external network sources, in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notatio) notation.
- `external_sources` (Set of String) The list of external network sources, in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) notation.


2 changes: 1 addition & 1 deletion docs/data-sources/zones.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Lists all zones.

## Example Usage

```hcl
```terraform
data "exoscale_zones" "example_zones" {}
# Outputs
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/migration-of-compute.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Before proceeding, please:

In this guide, we will assume the following configuration as an example:

```hcl
```terraform
resource "exoscale_compute" "my_instance" {
disk_size = 10
display_name = "my-instance"
Expand Down Expand Up @@ -88,7 +88,7 @@ Now, these resources are removed from the state.

Replace the `exoscale_network` block by the new `exoscale_private_network` resource:

```hcl
```terraform
resource "exoscale_private_network" "my_network" {
name = "privnet"
description = "Private Network"
Expand All @@ -103,7 +103,7 @@ In this example we are using unmanaged private network, for managed network you

Now replace `exoscale_compute` and `exoscale_nic` blocks with `exoscale_compute_instance`:

```hcl
```terraform
resource "exoscale_compute_instance" "my_instance" {
disk_size = 10
name = "my-instance"
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/migration-of-security-group-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Before proceeding, please:

In this guide, we will assume the following configuration as an example:

```hcl
```terraform
resource "exoscale_security_group" "webapp" {
name = "webapp"
# ...
Expand Down Expand Up @@ -122,7 +122,7 @@ Now, these resources are removed from the state.

Replace the `exoscale_security_group_rules` block by new `exoscale_security_group_rule` resources:

```hcl
```terraform
resource "exoscale_security_group_rule" "webapp_ssh" {
security_group_id = exoscale_security_group.webapp.id
type = "INGRESS"
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/migration-of-ssh-keypair.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Should you need to generate a key _pair_ (public and private key), we invite you
[tls_private_key][tls_private_key] and the resource's `public_key_openssh` output along Exoscale
`exoscale_ssh_key`. Example given:

```hcl
```terraform
resource "tls_private_key" "my_ssh_key" {
algorithm = "ED25519"
}
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use the Exoscale Terraform provider.

### Example

```hcl
```terraform
terraform {
required_providers {
exoscale = {
Expand Down Expand Up @@ -59,7 +59,7 @@ provider "exoscale" {
In addition of the global `timeout` provider setting, the waiting time of async
operations can be fine-tuned per resource and per operation type:

```hcl
```terraform
resource "exoscale_instance_pool" "web" {
# ...
Expand All @@ -77,7 +77,7 @@ resource "exoscale_instance_pool" "web" {

Here is a simple HCL configuration provisioning an Exoscale Compute instance:

```hcl
```terraform
terraform {
required_providers {
exoscale = {
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/elastic_ip.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Corresponding data source: [exoscale_elastic_ip](../data-sources/elastic_ip.md).

*Unmanaged* EIPv4:

```hcl
```terraform
resource "exoscale_elastic_ip" "my_elastic_ip" {
zone = "ch-gva-2"
}
```

*Managed* EIPv6:

```hcl
```terraform
resource "exoscale_elastic_ip" "my_managed_elastic_ip" {
zone = "ch-gva-2"
address_family = "inet6"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/iam_access_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Manage Exoscale [IAM Access Keys](https://community.exoscale.com/documentation/i

## Example Usage

```hcl
```terraform
resource "exoscale_iam_access_key" "my_sos_access_key" {
name = "my-sos-access-key"
operations = ["get-sos-object", "list-sos-bucket"]
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/iam_api_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Manage Exoscale [IAM](https://community.exoscale.com/documentation/iam/) API Key

## Example Usage

```hcl
```terraform
resource "exoscale_iam_role" "my_role" {
name = "my-role"
description = "Example role"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/iam_org_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Manage Exoscale [IAM](https://community.exoscale.com/documentation/iam/) Org Pol

## Example Usage

```hcl
```terraform
resource "exoscale_iam_org_policy" "org_policy" {
default_service_strategy = "allow"
services = {
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/instance_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ directory for complete configuration examples.
- `key_pair` (String) The [exoscale_ssh_key](./ssh_key.md) (name) to authorize in the managed instances.
- `labels` (Map of String) A map of key/value labels.
- `network_ids` (Set of String) A list of [exoscale_private_network](./private_network.md) (IDs).
- `security_group_ids` (Set of String) A list of [exoscale_security_group](./security_groups.md) (IDs).
- `security_group_ids` (Set of String) A list of [exoscale_security_group](./security_group.md) (IDs).
- `service_offering` (String, Deprecated) The managed instances type. Please use the `instance_type` argument instead.
- `state` (String)
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/nlb.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Corresponding data source: [exoscale_nlb](../data-sources/nlb.md).

## Example Usage

```hcl
```terraform
resource "exoscale_nlb" "my_nlb" {
zone = "ch-gva-2"
name = "my-nlb"
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/private_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Corresponding data source: [exoscale_private_network](../data-sources/private_ne

*Unmanaged* private network:

```hcl
```terraform
resource "exoscale_private_network" "my_private_network" {
zone = "ch-gva-2"
name = "my-private-network"
Expand All @@ -24,7 +24,7 @@ resource "exoscale_private_network" "my_private_network" {

*Managed* private network:

```hcl
```terraform
resource "exoscale_private_network" "my_managed_private_network" {
zone = "ch-gva-2"
name = "my-managed-private-network"
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/security_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Corresponding data source: [exoscale_security_group](../data-sources/security_gr

## Example Usage

```hcl
```terraform
resource "exoscale_security_group" "my_security_group" {
name = "my-security-group"
}
Expand All @@ -34,7 +34,7 @@ directory for complete configuration examples.
### Optional

- `description` (String) ❗ A free-form text describing the group.
- `external_sources` (Set of String) A list of external network sources, in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notatio) notation.
- `external_sources` (Set of String) A list of external network sources, in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) notation.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/sks_kubeconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Manage Exoscale [Scalable Kubernetes Service (SKS)](https://community.exoscale.c

## Example Usage

```hcl
```terraform
resource "exoscale_sks_cluster" "my_sks_cluster" {
zone = "ch-gva-2"
name = "my-sks-cluster"
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/sks_nodepool.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Manage Exoscale [Scalable Kubernetes Service (SKS)](https://community.exoscale.c

## Example Usage

```hcl
```terraform
resource "exoscale_sks_cluster" "my_sks_cluster" {
zone = "ch-gva-2"
name = "my-sks-cluster"
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/ssh_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Manage Exoscale [SSH Keys](https://community.exoscale.com/documentation/compute/

## Example Usage

```hcl
```terraform
resource "exoscale_ssh_key" "my_ssh_key" {
name = "my-ssh-key"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGRY..."
Expand All @@ -24,7 +24,7 @@ Should you want to _create_ an SSH keypair (including *private* key) with Terraf
[tls_private_key](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key)
resource:

```hcl
```terraform
resource "tls_private_key" "my_ssh_key" {
algorithm = "ED25519"
}
Expand Down
2 changes: 1 addition & 1 deletion exoscale/datasource_exoscale_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Corresponding resource: [exoscale_security_group](../resources/security_group.md
Elem: &schema.Schema{
Type: schema.TypeString,
},
Description: "The list of external network sources, in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notatio) notation.",
Description: "The list of external network sources, in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) notation.",
},
},

Expand Down
2 changes: 1 addition & 1 deletion exoscale/resource_exoscale_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func resourceSecurityGroupSchema() map[string]*schema.Schema {
Type: schema.TypeString,
ValidateFunc: validation.IsCIDRNetwork(0, 128),
},
Description: "A list of external network sources, in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notatio) notation.",
Description: "A list of external network sources, in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) notation.",
},
resSecurityGroupAttrName: {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/block_storage/datasource_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DataSourceSnapshotDescription = `Fetch [Exoscale Block Storage](https://co
Block Storage offers persistent externally attached volumes for your workloads.
Corresponding resource: [exoscale_block_storage_snapshot](../resources/block_storage_snapshot.md).`
Corresponding resource: [exoscale_block_storage_snapshot](../resources/block_storage_volume_snapshot.md).`

// Ensure provider defined types fully satisfy framework interfaces.
var _ datasource.DataSourceWithConfigure = &DataSourceSnapshot{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/instance_pool/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func Resource() *schema.Resource {
Elem: &schema.Schema{Type: schema.TypeString},
},
AttrSecurityGroupIDs: {
Description: "A list of [exoscale_security_group](./security_groups.md) (IDs).",
Description: "A list of [exoscale_security_group](./security_group.md) (IDs).",
Type: schema.TypeSet,
Optional: true,
Set: schema.HashString,
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/nlb_service/datasource_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Corresponding resource: [exoscale_nlb](../resources/nlb.md).`,
Optional: true,
},
NLBServiceListAttrNLBServiceList: schema.ListNestedAttribute{
MarkdownDescription: "The list of [exoscale_nlb_service](./nlb_service.md).",
MarkdownDescription: "The list of [exoscale_nlb_service](./nlb_service_list.md).",
Computed: true,
NestedObject: schema.NestedAttributeObject{
Attributes: map[string]schema.Attribute{
Expand Down
2 changes: 1 addition & 1 deletion templates/data-sources/database_uri.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Corresponding resource: [exoscale_database](../resources/database.md).

## Example Usage

```hcl
```terraform
resource "exoscale_database" "my_database" {
zone = "ch-gva-2"
name = "my-database"
Expand Down
2 changes: 1 addition & 1 deletion templates/data-sources/nlb_service_list.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: |-

## Example Usage

```hcl
```terraform
data "exoscale_nlb_service_list" "example_nlb_services" {
name = "my-nlb"
}
Expand Down
2 changes: 1 addition & 1 deletion templates/data-sources/zones.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: |-

## Example Usage

```hcl
```terraform
data "exoscale_zones" "example_zones" {}

# Outputs
Expand Down
6 changes: 3 additions & 3 deletions templates/guides/migration-of-compute.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Before proceeding, please:

In this guide, we will assume the following configuration as an example:

```hcl
```terraform
resource "exoscale_compute" "my_instance" {
disk_size = 10
display_name = "my-instance"
Expand Down Expand Up @@ -88,7 +88,7 @@ Now, these resources are removed from the state.

Replace the `exoscale_network` block by the new `exoscale_private_network` resource:

```hcl
```terraform
resource "exoscale_private_network" "my_network" {
name = "privnet"
description = "Private Network"
Expand All @@ -103,7 +103,7 @@ In this example we are using unmanaged private network, for managed network you

Now replace `exoscale_compute` and `exoscale_nic` blocks with `exoscale_compute_instance`:

```hcl
```terraform
resource "exoscale_compute_instance" "my_instance" {
disk_size = 10
name = "my-instance"
Expand Down
4 changes: 2 additions & 2 deletions templates/guides/migration-of-security-group-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Before proceeding, please:

In this guide, we will assume the following configuration as an example:

```hcl
```terraform
resource "exoscale_security_group" "webapp" {
name = "webapp"
# ...
Expand Down Expand Up @@ -122,7 +122,7 @@ Now, these resources are removed from the state.

Replace the `exoscale_security_group_rules` block by new `exoscale_security_group_rule` resources:

```hcl
```terraform
resource "exoscale_security_group_rule" "webapp_ssh" {
security_group_id = exoscale_security_group.webapp.id
type = "INGRESS"
Expand Down
Loading

0 comments on commit 3805304

Please sign in to comment.