Skip to content

Commit aacc27f

Browse files
committed
update README.md
1 parent 7cd62df commit aacc27f

File tree

1 file changed

+78
-22
lines changed

1 file changed

+78
-22
lines changed

README.md

+78-22
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
<img src="https://img.shields.io/badge/Terraform-v0.15-green" alt="Terraform">
1818
</a>
1919
<a href="LICENSE.md">
20-
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="Licence">
20+
<img src="https://img.shields.io/badge/License-APACHE-blue.svg" alt="Licence">
2121
</a>
2222

2323

2424
</p>
2525
<p align="center">
2626

27-
<a href='https://facebook.com/sharer/sharer.php?u=https://github.com/clouddrove/terraform-digitalocean-spaces'>
27+
<a href='https://facebook.com/sharer/sharer.php?u=https://github.com/terraform-do-modules/terraform-digitalocean-spaces'>
2828
<img title="Share on Facebook" src="https://user-images.githubusercontent.com/50652676/62817743-4f64cb80-bb59-11e9-90c7-b057252ded50.png" />
2929
</a>
30-
<a href='https://www.linkedin.com/shareArticle?mini=true&title=Terraform+Digitalocean+spaces&url=https://github.com/clouddrove/terraform-digitalocean-spaces'>
30+
<a href='https://www.linkedin.com/shareArticle?mini=true&title=Terraform+Digitalocean+spaces&url=https://github.com/terraform-do-modules/terraform-digitalocean-spaces'>
3131
<img title="Share on LinkedIn" src="https://user-images.githubusercontent.com/50652676/62817742-4e339e80-bb59-11e9-87b9-a1f68cae1049.png" />
3232
</a>
33-
<a href='https://twitter.com/intent/tweet/?text=Terraform+Digitalocean+spaces&url=https://github.com/clouddrove/terraform-digitalocean-spaces'>
33+
<a href='https://twitter.com/intent/tweet/?text=Terraform+Digitalocean+spaces&url=https://github.com/terraform-do-modules/terraform-digitalocean-spaces'>
3434
<img title="Share on Twitter" src="https://user-images.githubusercontent.com/50652676/62817740-4c69db00-bb59-11e9-8a79-3580fbbf6d5c.png" />
3535
</a>
3636

@@ -51,7 +51,7 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c
5151

5252
This module has a few dependencies:
5353

54-
- [Terraform 0.15](https://learn.hashicorp.com/terraform/getting-started/install.html)
54+
- [Terraform 1.x.x](https://learn.hashicorp.com/terraform/getting-started/install.html)
5555
- [Go](https://golang.org/doc/install)
5656
- [github.com/stretchr/testify/assert](https://github.com/stretchr/testify)
5757
- [github.com/gruntwork-io/terratest/modules/terraform](https://github.com/gruntwork-io/terratest)
@@ -65,23 +65,82 @@ This module has a few dependencies:
6565
## Examples
6666

6767

68-
**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-digitalocean-spaces/releases).
68+
**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-spaces/releases).
6969

7070

7171
### Simple Example
7272
Here is an example of how you can use this module in your inventory structure:
73+
### basic example
7374
```hcl
7475
module "spaces" {
7576
source = "terraform-do-modules/spaces/digitalocean"
7677
version = "0.15.0"
77-
name = "clouddrove"
78+
name = "spaces"
7879
environment = "test"
79-
label_order = ["name"]
80-
acl = "public-read"
81-
force_destroy = true
80+
acl = "private"
81+
force_destroy = false
8282
region = "nyc3"
8383
}
8484
```
85+
### complete example
86+
```hcl
87+
module "spaces" {
88+
source = "terraform-do-modules/spaces/digitalocean"
89+
version = "0.15.0"
90+
name = "spaces"
91+
environment = "test"
92+
acl = "private"
93+
force_destroy = false
94+
region = "nyc3"
95+
96+
cors_rule = [
97+
{
98+
allowed_headers = ["*"]
99+
allowed_methods = ["PUT", "POST"],
100+
allowed_origins = ["https://www.example.com"],
101+
expose_headers = ["ETag"],
102+
max_age_seconds = 3000
103+
}
104+
]
105+
106+
lifecycle_rule = [
107+
{
108+
enabled = true
109+
abort_incomplete_multipart_upload_days = 20
110+
expiration = [
111+
{
112+
date = "2029-02-28"
113+
days = 85
114+
expired_object_delete_marker = true
115+
}
116+
]
117+
noncurrent_version_expiration_days = 15
118+
119+
}
120+
]
121+
122+
policy = jsonencode({
123+
"Version" : "2012-10-17",
124+
"Statement" : [
125+
{
126+
"Sid" : "IPAllow",
127+
"Effect" : "Deny",
128+
"Principal" : "*",
129+
"Action" : "s3:*",
130+
"Resource" : [
131+
"arn:aws:s3:::space-name",
132+
"arn:aws:s3:::space-name/*"
133+
],
134+
"Condition" : {
135+
"NotIpAddress" : {
136+
"aws:SourceIp" : "0.0.0.0/0"
137+
}
138+
}
139+
}
140+
]
141+
})
142+
}
143+
```
85144

86145

87146

@@ -92,21 +151,18 @@ Here is an example of how you can use this module in your inventory structure:
92151

93152
| Name | Description | Type | Default | Required |
94153
|------|-------------|------|---------|:--------:|
95-
| abort\_incomplete\_multipart\_upload\_days | Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload. | `number` | `null` | no |
96154
| acl | Canned ACL applied on bucket creation (private or public-read). | `string` | `null` | no |
97-
| attributes | Additional attributes (e.g. `1`). | `list(any)` | `[]` | no |
98155
| cors\_rule | CORS Configuration specification for this bucket | <pre>list(object({<br> allowed_headers = list(string)<br> allowed_methods = list(string)<br> allowed_origins = list(string)<br> expose_headers = list(string)<br> max_age_seconds = number<br> }))</pre> | `null` | no |
99-
| date | pecifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g.(2020-03-22T15:03:55Z) or parts thereof e.g. 2019-02-28. | `string` | `null` | no |
100-
| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. | `string` | `"-"` | no |
156+
| enabled | Whether to create the resources. Set to `false` to prevent the module from creating any resources. | `bool` | `true` | no |
101157
| environment | Environment (e.g. `prod`, `dev`, `staging`). | `string` | `""` | no |
102-
| expiration\_days | Specifies the number of days after object creation when the applicable objects will expire. | `number` | `null` | no |
103-
| expired\_object\_delete\_marker | On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers. | `string` | `""` | no |
158+
| expiration | n/a | `list(any)` | `[]` | no |
104159
| force\_destroy | Unless true, the bucket will only be destroyed if empty (Defaults to false). | `bool` | `false` | no |
105-
| label\_order | Label order, e.g. `name`,`application`. | `list(any)` | `[]` | no |
160+
| label\_order | Label order, e.g. `name`,`application`. | `list(any)` | <pre>[<br> "name",<br> "environment"<br>]</pre> | no |
161+
| lifecycle\_rule | n/a | `list(any)` | `[]` | no |
162+
| managedby | ManagedBy, eg 'terraform-do-modules' or '[email protected]' | `string` | `"terraform-do-modules"` | no |
106163
| name | Name (e.g. `app` or `cluster`). | `string` | `""` | no |
107-
| noncurrent\_version\_expiration | On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers. | `string` | `""` | no |
108-
| prefix | (Optional, Forces new resource) Creates a unique bucket name beginning with the specified prefix. | `string` | `null` | no |
109-
| region | The region to create VPC, like `london-1` , `bangalore-1` ,`newyork-3` `toronto-1`. | `string` | `""` | no |
164+
| policy | n/a | `any` | `null` | no |
165+
| region | The region to create spaces. | `string` | `"blr1"` | no |
110166
| versioning | (Optional) A state of versioning (documented below). | `bool` | `true` | no |
111167

112168
## Outputs
@@ -131,9 +187,9 @@ You need to run the following command in the testing folder:
131187

132188

133189
## Feedback
134-
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-digitalocean-spaces/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]).
190+
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-spaces/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]).
135191

136-
If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-digitalocean-spaces)!
192+
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-spaces)!
137193

138194
## About us
139195

0 commit comments

Comments
 (0)