Skip to content

Commit

Permalink
Regenerate documentation
Browse files Browse the repository at this point in the history
We also now use https://github.com/hashicorp/terraform-plugin-docs as
suggested by the Terraform documentation.
  • Loading branch information
nlewo committed Dec 13, 2021
1 parent 5b1d500 commit 971128b
Show file tree
Hide file tree
Showing 17 changed files with 564 additions and 149 deletions.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ repos:
hooks:
- id: check-toml
- id: end-of-file-fixer
# Files in this directory are generated by
# https://github.com/hashicorp/terraform-plugin-docs
exclude: ^docs/
- id: trailing-whitespace
# Files in this directory are generated by
# https://github.com/hashicorp/terraform-plugin-docs
exclude: ^docs/
- id: check-merge-conflict

- repo: https://github.com/dnephin/pre-commit-golang
Expand All @@ -25,6 +31,9 @@ repos:
hooks:
- id: prettier
types_or: [yaml, toml, markdown]
# Files in this directory are generated by
# https://github.com/hashicorp/terraform-plugin-docs
exclude: ^docs/
additional_dependencies:
- [email protected]
- [email protected]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ Then in the repo root dir
pre-commit install
```

### Generating documentation

As suggested by the [Terraform
documentation](https://www.terraform.io/docs/registry/providers/docs.html#generating-documentation),
we use the
[tfplugindocs](https://github.com/hashicorp/terraform-plugin-docs)
project to generate the provider documentation.

## Adding Dependencies

This provider uses [Go modules](https://github.com/golang/go/wiki/Modules).
Expand Down
36 changes: 23 additions & 13 deletions docs/data-sources/domain.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
# Data Source: domain
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gandi_domain Data Source - terraform-provider-gandi"
subcategory: ""
description: |-
---

Use this data source to get the ID of a domain for other resources.
# gandi_domain (Data Source)

## Example Usage

```terraform
data "gandi_domain" "my_domain" {
name = "my.domain"
}
```

## Argument Reference

- `name` - (Required) The FQDN of the domain.

## Attribute Reference
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **name** (String) The FQDN of the domain

### Optional

- **id** (String) The ID of this resource.

### Read-Only

- **nameservers** (List of String) A list of nameservers for the domain


- `id` - The ID of the domain.
- `nameservers` - A list of nameservers for the domain.
20 changes: 0 additions & 20 deletions docs/data-sources/livedns_domain ns.md

This file was deleted.

31 changes: 19 additions & 12 deletions docs/data-sources/livedns_domain.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
# Data Source: livedns_domain
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gandi_livedns_domain Data Source - terraform-provider-gandi"
subcategory: ""
description: |-
---

Use this data source to get the ID of a domain for other resources.
# gandi_livedns_domain (Data Source)

## Example Usage

```terraform
data "gandi_livedns_domain" "my_domain" {
name = "my.domain"
}
```

## Argument Reference

- `name` - (Required) The FQDN of the domain.

## Attribute Reference
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **name** (String) The FQDN of the domain

### Optional

- **id** (String) The ID of this resource.


- `id` - The ID of the domain.
30 changes: 30 additions & 0 deletions docs/data-sources/livedns_domain_ns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gandi_livedns_domain_ns Data Source - terraform-provider-gandi"
subcategory: ""
description: |-
---

# gandi_livedns_domain_ns (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **name** (String) The FQDN of the domain

### Optional

- **id** (String) The ID of this resource.

### Read-Only

- **nameservers** (List of String) A list of nameservers for the domain


27 changes: 27 additions & 0 deletions docs/data-sources/mailbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gandi_mailbox Data Source - terraform-provider-gandi"
subcategory: ""
description: |-
---

# gandi_mailbox (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **domain** (String) Domain name
- **mailbox_id** (String) Mailbox ID

### Optional

- **id** (String) The ID of this resource.


7 changes: 6 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Gandi Provider

The Gandi provider enables the purchasing and management of domain names through the [Gandi domain registrar](https://gandi.net). It also supports management of DNS hosting through the LiveDNS service.
The Gandi provider enables the purchasing and management of the
following Gandi resources:
- [DNS zones](https://api.gandi.net/docs/domains/)
- [LiveDNS service](https://api.gandi.net/docs/livedns/)
- [Email](https://api.gandi.net/docs/email/)
- [SimpleHosting](https://api.gandi.net/docs/simplehosting/)

The provider needs to be configured with the proper credentials before it can be used.

Expand Down
42 changes: 19 additions & 23 deletions docs/resources/dnssec_key.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
# Resource: dnssec_key
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gandi_dnssec_key Resource - terraform-provider-gandi"
subcategory: ""
description: |-
---

The `dnssec_key` resource creates a DNSSEC key to a domain.
# gandi_dnssec_key (Resource)

## Example Usage

```terraform
resource "gandi_dnssec_key" "my_key" {
domain = "example.com"
algorithm = 15
type = "ksk"
public_key = "Z6eCbfmpYPYmOJ0PYKq8fKzxcP3K/xEBlF5omvO+UwY="
}
```

## Argument Reference

- `domain` - (Required) The domain to add the key to.
- `name` - (Required) The algorithm used for the key.
- `type` - (Required) "ksk" or "zsk".
- `public_key` - (Required) The public key to use.

## Attribute Reference
<!-- schema generated by tfplugindocs -->
## Schema

- `digest` - Digest of the added key.
- `digest_type` - Type of digest.
- `keytag` - The keytag assigned by the server.
### Required

## Import
- **algorithm** (Number) DNSSEC algorithm type
- **domain** (String) Domain name
- **public_key** (String) DNSSEC public key
- **type** (String) DNSSEC key type

### Optional

- **id** (String) The ID of this resource.

Existing keys can be imported by running:

`terraform import gandi_dnssec_key.my_key example.com/<id>`, where the key ID is a UUID that can be found through querying the [Gandi API](https://api.gandi.net/docs/domains/#get-v5-domain-domains-domain-dnskeys)
Loading

0 comments on commit 971128b

Please sign in to comment.