Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ovaistariq committed Aug 30, 2024
1 parent e46ee36 commit 3464f7a
Show file tree
Hide file tree
Showing 8 changed files with 215 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ tools:
@echo "==> Installing development tooling..."
go generate -tags tools tools/tools.go

docs: tools
@sh -c "'$(CURDIR)/scripts/generate-docs.sh'"

.PHONY: build install lint terraform-provider-lint vet fmt golangci-lint tools
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ resource "tigris_bucket_shadow_config" "example_shadow_config" {
}
```

## Developing

### Documentation

The documentation for this provider is generated using terraform-plugin-docs. To generate the documentation, run the following command:

```shell
make docs
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
22 changes: 22 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tigris Provider"
subcategory: ""
description: |-
---

# tigris Provider





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

### Optional

- `access_key` (String) The access key. It can also be sourced from the AWS_ACCESS_KEY_ID environment variable.
- `endpoint` (String) The endpoint for the Tigris object storage service.
- `secret_key` (String, Sensitive) The secret key. It can also be sourced from the AWS_SECRET_ACCESS_KEY environment variable.
38 changes: 38 additions & 0 deletions docs/resources/bucket.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tigris_bucket Resource - terraform-provider-tigris"
subcategory: ""
description: |-
Provides a Tigris bucket resource. This can be used to create and manage Tigris buckets.
---

# tigris_bucket (Resource)

Provides a Tigris bucket resource. This can be used to create and manage Tigris buckets.



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

### Required

- `bucket` (String) The name of the Tigris bucket.

### Optional

- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

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

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `delete` (String)
- `read` (String)
- `update` (String)
40 changes: 40 additions & 0 deletions docs/resources/bucket_public_access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tigris_bucket_public_access Resource - terraform-provider-tigris"
subcategory: ""
description: |-
Provides a Tigris bucket resource. This can be used to create and manage Tigris buckets.
---

# tigris_bucket_public_access (Resource)

Provides a Tigris bucket resource. This can be used to create and manage Tigris buckets.



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

### Required

- `bucket` (String) The name of the Tigris bucket.

### Optional

- `acl` (String) The canned ACL to apply to the bucket.
- `public_list_objects` (Boolean) Whether to allow public listing of objects in the bucket.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

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

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `delete` (String)
- `read` (String)
- `update` (String)
44 changes: 44 additions & 0 deletions docs/resources/bucket_shadow_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tigris_bucket_shadow_config Resource - terraform-provider-tigris"
subcategory: ""
description: |-
Provides a Tigris bucket shadow configuration resource.
---

# tigris_bucket_shadow_config (Resource)

Provides a Tigris bucket shadow configuration resource.



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

### Required

- `bucket` (String) The name of the Tigris bucket.
- `shadow_access_key` (String, Sensitive) The access key for the shadow bucket.
- `shadow_bucket` (String) The name of the shadow bucket.
- `shadow_secret_key` (String, Sensitive) The secret key for the shadow bucket.

### Optional

- `shadow_endpoint` (String) The endpoint for the shadow bucket.
- `shadow_region` (String) The region for the shadow bucket.
- `shadow_write_through` (Boolean) Whether to write through to the shadow bucket.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

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

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `delete` (String)
- `read` (String)
- `update` (String)
39 changes: 39 additions & 0 deletions docs/resources/bucket_website_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tigris_bucket_website_config Resource - terraform-provider-tigris"
subcategory: ""
description: |-
Provides a Tigris bucket website configuration resource.
---

# tigris_bucket_website_config (Resource)

Provides a Tigris bucket website configuration resource.



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

### Required

- `bucket` (String) The name of the Tigris bucket.

### Optional

- `domain_name` (String) The custom domain name to apply to the bucket.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

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

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `delete` (String)
- `read` (String)
- `update` (String)
19 changes: 19 additions & 0 deletions scripts/generate-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# Generate the documentation using tfplugindocs and remove changes to files that
# shouldn't change

exclude_files=()

# Check if manual changes were made to any excluded files and exit
# otherwise these will be lost with `tfplugindocs`
# if [ "$(git status --porcelain "${exclude_files[@]}")" ]; then
# echo "Uncommitted changes were detected to the following files. These aren't autogenerated, please commit or stash these changes and try again"
# echo $(git status --porcelain "${exclude_files[@]}")
# exit 1
# fi

tfplugindocs generate -rendered-provider-name "Tigris"

# Remove the changes to files we don't autogenerate
git checkout HEAD -- "${exclude_files[@]}"

0 comments on commit 3464f7a

Please sign in to comment.