From 6ce15ff35affe5b9cff802d7c5790650ff99bf07 Mon Sep 17 00:00:00 2001 From: Benoit Garcia Date: Sat, 4 Feb 2023 19:51:40 +0100 Subject: [PATCH] chore(doc): Add terraform-docs config file and create Readme file. --- .terraform-docs.yaml | 37 ++++++++++++++++++++++++++++ README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 .terraform-docs.yaml create mode 100644 README.md diff --git a/.terraform-docs.yaml b/.terraform-docs.yaml new file mode 100644 index 0000000..aae6170 --- /dev/null +++ b/.terraform-docs.yaml @@ -0,0 +1,37 @@ +formatter: "markdown table" + +header-from: main.tf +footer-from: "" + +recursive: + enabled: false + +sections: + hide: ["providers"] + +output: + file: "README.md" + mode: inject + template: |- + + {{ .Content }} + + +output-values: + enabled: false + from: "" + +sort: + enabled: true + by: required + +settings: + anchor: true + default: true + escape: false + hide-empty: true + html: false + indent: 2 + required: true + sensitive: true + type: true diff --git a/README.md b/README.md new file mode 100644 index 0000000..e1824b1 --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +# Terraform / Scaleway + +## Purpose + +This repository is used to manage object storage buckets on scaleway using terraform. + +## Usage + +- Setup the [scaleway provider](https://www.terraform.io/docs/providers/scaleway/index.html) in your tf file. +- Include this module in your tf file. Refer to [documentation](https://www.terraform.io/docs/modules/sources.html#generic-git-repository). + +```hcl +module "my_bucket" { + source = "scaleway-terraform-modules/bucket/scaleway" + version = "0.0.1" + +} +``` + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement_terraform) | >= 0.13 | +| [scaleway](#requirement_scaleway) | >= 2.7.0 | + +## Resources + +| Name | Type | +|------|------| +| [scaleway_object_bucket.this](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/object_bucket) | resource | +| [scaleway_object_bucket_lock_configuration.this](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/resources/object_bucket_lock_configuration) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [name](#input_name) | Name of the bucket. | `string` | n/a | yes | +| [force_destroy](#input_force_destroy) | Enable deletion of objects in bucket before destroying, locked objects or under legal hold are also deleted and not recoverable. | `bool` | `false` | no | +| [versioning_enabled](#input_versioning_enabled) | Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. | `bool` | `false` | no | +| [versioning_lock_configuration](#input_versioning_lock_configuration) | Specifies the Object Lock rule for the bucket. Requires versioning. | ```object({ mode = string, days = optional(number), years = optional(number), })``` | ```{ "days": null, "mode": "GOVERNANCE", "years": null }``` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [bucket_endpoint](#output_bucket_endpoint) | n/a | +| [bucket_id](#output_bucket_id) | n/a | + + +## Authors + +Module is maintained with help from [the community](https://github.com/scaleway-terraform-modules/terraform-scaleway-bucket/graphs/contributors). + +## License + +Mozilla Public License 2.0 Licensed. See [LICENSE](https://github.com/scaleway-terraform-modules/.github/tree/master/LICENSE) for full details.