Skip to content

Commit 58d510e

Browse files
fix: update source of labels module and readme.yml file
1 parent 6d08572 commit 58d510e

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

README.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ badges:
2424

2525
# description of this project
2626
description: |-
27-
spaces are virtual networks containing resources that can communicate with each other in full isolation, using private IP addresses.
28-
27+
Terraform module to create Digitalocean spaces service resource on Digitalocean.
2928
# extra content
3029
include:
3130
- "terraform.md"
@@ -38,7 +37,7 @@ usage : |-
3837
```hcl
3938
module "spaces" {
4039
source = "terraform-do-modules/spaces/digitalocean"
41-
version = "0.15.0"
40+
version = "1.0.0"
4241
name = "spaces"
4342
environment = "test"
4443
acl = "private"
@@ -50,7 +49,7 @@ usage : |-
5049
```hcl
5150
module "spaces" {
5251
source = "terraform-do-modules/spaces/digitalocean"
53-
version = "0.15.0"
52+
version = "1.0.0"
5453
name = "spaces"
5554
environment = "test"
5655
acl = "private"

main.tf

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,26 @@
22
## Labels module callled that will be used for naming and tags.
33
##-----------------------------------------------------------------------------
44
module "labels" {
5-
source = "git::https://github.com/terraform-do-modules/terraform-digitalocean-labels.git?ref=internal-426m"
5+
source = "terraform-do-modules/labels/digitalocean"
6+
version = "1.0.0"
67
name = var.name
78
environment = var.environment
89
managedby = var.managedby
910
label_order = var.label_order
1011
}
1112

12-
#Module : Spaces
13-
#Description : Provides a bucket resource for Spaces, DigitalOcean's object storage product.
14-
13+
##############################################################################################
14+
##Description : Provides a bucket resource for Spaces, DigitalOcean's object storage product.
15+
##############################################################################################
1516
resource "digitalocean_spaces_bucket" "spaces" {
16-
count = var.enabled ? 1 : 0
17-
name = module.labels.id
18-
region = var.region
19-
acl = var.acl
20-
17+
count = var.enabled ? 1 : 0
18+
name = module.labels.id
19+
region = var.region
20+
acl = var.acl
2121
force_destroy = var.force_destroy
2222

2323
dynamic "cors_rule" {
2424
for_each = var.cors_rule == null ? [] : var.cors_rule
25-
2625
content {
2726
allowed_headers = cors_rule.value.allowed_headers
2827
allowed_methods = cors_rule.value.allowed_methods
@@ -56,15 +55,14 @@ resource "digitalocean_spaces_bucket" "spaces" {
5655
versioning {
5756
enabled = var.versioning
5857
}
59-
6058
}
6159

62-
60+
################################################################################################################
61+
#Description : The digitalocean_spaces_bucket_policy resource allows Terraform to attach bucket policy to Spaces.
62+
################################################################################################################
6363
resource "digitalocean_spaces_bucket_policy" "foobar" {
64-
count = var.enabled && var.policy != null ? 1 : 0
65-
64+
count = var.enabled && var.policy != null ? 1 : 0
6665
region = join("", digitalocean_spaces_bucket.spaces[*].region)
6766
bucket = join("", digitalocean_spaces_bucket.spaces[*].name)
6867
policy = var.policy
6968
}
70-

variables.tf

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ variable "label_order" {
2020

2121
variable "managedby" {
2222
type = string
23-
default = "terraform-do-modules"
23+
default = "[email protected]"
2424
description = "ManagedBy, eg 'terraform-do-modules' or '[email protected]'"
2525
}
2626

@@ -33,7 +33,6 @@ variable "region" {
3333
#Module : spaces
3434
#Description : Provides a bucket resource for Spaces, DigitalOcean's object storage product.
3535

36-
3736
variable "acl" {
3837
type = string
3938
default = null
@@ -64,23 +63,26 @@ variable "cors_rule" {
6463
description = "CORS Configuration specification for this bucket"
6564
}
6665

67-
6866
variable "lifecycle_rule" {
69-
type = list(any)
70-
default = []
67+
type = list(any)
68+
default = []
69+
description = "A configuration of object lifecycle management (documented below)."
7170
}
71+
7272
variable "expiration" {
73-
type = list(any)
74-
default = []
73+
type = list(any)
74+
default = []
75+
description = "Specifies a time period after which applicable objects expire (documented below)."
7576
}
7677

7778
variable "policy" {
78-
type = any
79-
default = null
79+
type = any
80+
default = null
81+
description = "The text of the policy."
8082
}
8183

8284
variable "enabled" {
8385
type = bool
8486
default = true
8587
description = "Whether to create the resources. Set to `false` to prevent the module from creating any resources."
86-
}
88+
}

0 commit comments

Comments
 (0)