From d2d534a364aa4baad118e4127c79f008572e9817 Mon Sep 17 00:00:00 2001 From: clouddrove-ci Date: Thu, 27 Jul 2023 16:03:57 +0000 Subject: [PATCH] update README.md --- README.md | 74 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 9e815d7..e4c050d 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,25 @@

- Terraform Module Template + Terraform Digitalocean Container Registry + +

- Terraform module template to create new modules using this as baseline + Terraform module to create Digitalocean container registry service resource on Digitalocean.

- - Latest Release + + Latest Release + + + tfsec - - tfsec + + Terraform Licence @@ -27,13 +32,13 @@

- + - + - + @@ -53,11 +58,7 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c ## Prerequisites This module has a few dependencies: - -- [Terraform 1.x.x](https://learn.hashicorp.com/terraform/getting-started/install.html) -- [Go](https://golang.org/doc/install) -- [github.com/stretchr/testify/assert](https://github.com/stretchr/testify) -- [github.com/gruntwork-io/terratest/modules/terraform](https://github.com/gruntwork-io/terratest) +- [Terraform 1.4.6](https://learn.hashicorp.com/terraform/getting-started/install.html) @@ -68,12 +69,21 @@ This module has a few dependencies: ## Examples -**IMPORTANT:** Since the `master` branch used in `source` varies based on new modifications, we suggest that you use the release versions [here](https://github.com/clouddrove/terraform-module-template/releases). +**IMPORTANT:** Since the `master` branch used in `source` varies based on new modifications, we suggest that you use the release versions [here](https://github.com/terraform-do-modules/terraform-digitalocean-container-registry/releases). -Here are some examples of how you can use this module in your inventory structure: +### Simple Example +Here is an example of how you can use this module in your inventory structure: ```hcl - ``` + module "container-registry" { + source = "terraform-do-modules/container-registry/digitalocean" + version = "1.0.0" + name = local.name + environment = local.environment + region = local.region + subscription_tier_slug = "starter" + } +``` @@ -82,11 +92,33 @@ Here are some examples of how you can use this module in your inventory structur ## Inputs -No input. +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| enabled | Whether to create the resources. Set to `false` to prevent the module from creating any resources. | `bool` | `true` | no | +| environment | Environment (e.g. `prod`, `dev`, `staging`). | `string` | `""` | no | +| expiry\_seconds | The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000. | `number` | `1576800000` | no | +| label\_order | Label order, e.g. `name`,`application`. | `list(any)` |

[
"name",
"environment"
]
| no | +| managedby | ManagedBy, eg 'terraform-do-modules' or 'hello@clouddrove.com' | `string` | `"terraform-do-modules"` | no | +| name | Name (e.g. `app` or `cluster`). | `string` | `""` | no | +| region | The region to create VPC, like `london-1` , `bangalore-1` ,`newyork-3` `toronto-1`. | `string` | `"syd1"` | no | +| subscription\_tier\_slug | The slug identifier for the subscription tier to use (starter, basic, or professional). | `string` | `"starter"` | no | +| write | Allow for write access to the container registry. Defaults to false. | `bool` | `false` | no | ## Outputs -No output. +| Name | Description | +|------|-------------| +| created\_at | The date and time when the registry was created. | +| credential\_expiration\_time | The date and time the registry access token will expire. | +| docker\_credentials | Credentials for the container registry. | +| endpoint | The URL endpoint of the container registry. | +| expiry\_seconds | Number of seconds after creation for token to expire. | +| id | The id of the container registry. | +| name | The name of the container registry. | +| region | The slug identifier for the region. | +| server\_url | The domain of the container registry. | +| storage\_usage\_bytes | The amount of storage used in the registry in bytes. | +| subscription\_tier\_slug | The slug identifier for the subscription tier. | @@ -102,9 +134,9 @@ You need to run the following command in the testing folder: ## Feedback -If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-module-template/issues), or feel free to drop us an email at [hello@clouddrove.com](mailto:hello@clouddrove.com). +If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/terraform-do-modules/terraform-digitalocean-container-registry/issues), or feel free to drop us an email at [hello@clouddrove.com](mailto:hello@clouddrove.com). -If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-module-template)! +If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/terraform-do-modules/terraform-digitalocean-container-registry)! ## About us