Skip to content

Community maintained Terraform module for managing DigitalOcean Spaces.

Notifications You must be signed in to change notification settings

rhysbeingsocial/terraform-digitalocean-spaces-bucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-digitalocean-spaces-bucket

An Open Source Terraform module that creates Spaces on DigitalOcean.

Terraform documentation on Spaces

If you come across any problems, please open an issue.

Usage Examples

Basic example

module  "spaces-bucket" {
    source  = "rhysjson/spaces-bucket/digitalocean"
    version = "0.1.0"
    spaces = [{
	    "name" = "bucket-name"
	    "region" = "ams3"
	    "acl" = "private"
	    "cors_rule" = [{
            allowed_headers = ["*"]
            allowed_methods = ["GET"]
            allowed_origins = ["*"]
            max_age_seconds = 3000
	    }]
	    "lifecycle_rule" = {
            "enabled" = true
            "expiration" = {
                days = 15
            }
	    }
	    "force_destroy" = false
    }]
}

If you're looking to try Digitalocean out, sign up here and get $100 free credit.

Requirements

Name Version
terraform >= 1.0.1
digitalocean ~> 2.0

Providers

Name Version
digitalocean 2.10.1

Modules

No modules.

Resources

Name Type
digitalocean_spaces_bucket.spaces resource

Inputs

Name Description Type Default Required
spaces List of Spaces you want to create any n/a yes
spaces_default Default list of Spaces variables. We don't need to pass anything to this variable.
object({
name = string
region = string
acl = string
cors_rule = object({
allowed_headers = list(string)
allowed_methods = list(string)
allowed_origins = list(string)
max_age_sections = number
})
lifecycle_rule = object({
id = string
prefix = string
enabled = bool
abort_incomplete_multipart_upload_days = number
expiration = object({
date = string
days = number
expired_object_delete_marker = bool
})
noncurrent_version_expiration = object({
days = number
})
})
versioning = object({
enabled = bool
})
force_destroy = bool
})
{
"acl": null,
"cors_rule": null,
"force_destroy": null,
"lifecycle_rule": null,
"name": null,
"region": null,
"versioning": null
}
no

Outputs

Name Description
bucket_domain_name The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
name The name of the bucket
region The name of the region
urn The uniform resource name for the bucket

About

Community maintained Terraform module for managing DigitalOcean Spaces.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages