Skip to content

papanito/terraform-backblaze-generic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-backblaze-generic

Terraform module to simplify backblaze setup of groups and projects.

Requirements

Name Version
terraform >= 1.14
b2 ~> 0.8

Providers

Name Version
b2 0.12.0

Modules

No modules.

Resources

Name Type
b2_bucket.buckets resource

Inputs

Name Description Type Default Required
buckets A map of configuration objects for Backblaze B2 buckets.

Each object in the list supports:

Required:
- bucket_name: The name of the bucket. Modifying this forces a new resource.
- bucket_type: The bucket type. Either 'allPublic' or 'allPrivate'.
- bucket_info: Map of user-defined information to be stored with the bucket (Optional)
- encryption_algorithm: 'AES256' (Optional).
- encryption_mode: Encryption mode (Optional).

Object Lock is a security feature that can provide data immutability by restricting a file from being modified or deleted for a specified period of time (Object Lock Retention Policy).
Object Lock must be enabled on a Bucket for an Object Lock Retention Policy to be applied. Learn more.
Applying a Retention Policy to a bucket will prevent a file from being deleted or modified for the specified number of days. Learn more.
- lock_enabled: Boolean to enable File Lock.
- retention_mode: 'compliance', 'governance', or 'none'.
- retention_duration: Number for the retention period.
- retention_unit: 'days' or 'years'.

B2 supports Cross-Origins Resource Sharing (CORS) allowing you to share your files across different sites. - Learn More
- cors_rules: A list of CORS configuration blocks:
- cors_rule_name: A human-readable name for the rule.
- allowed_origins: List of origins the rule covers.
- allowed_operations: List of operations (e.g., s3_get, s3_put).
- max_age_seconds: Max seconds a browser may cache the response.
- allowed_headers: (Optional) List of allowed headers in pre-flight.
- expose_headers: (Optional) List of headers exposed to the client.

Lifecycle Settings control how long to keep files in your B2 bucket - Learn More
- lifecycle_rules: A list of lifecycle configuration blocks:
- file_name_prefix: Files the rule applies to.
- days_from_hiding_to_deleting: Days to keep non-current versions.
- days_from_starting_to_canceling_unfinished_large_files: Cleanup for failed uploads.
- days_from_uploading_to_hiding: Days until a file is automatically hidden.
map(object({
bucket_type = string
bucket_info = optional(map(string))

cors_rules = optional(list(object({
cors_rule_name = string
allowed_origins = list(string)
allowed_operations = list(string)
max_age_seconds = number
allowed_headers = optional(list(string))
expose_headers = optional(list(string))
})))

# Simplified Lock/Retention
lock_enabled = optional(bool, false)
retention_mode = optional(string) # compliance
governance none
retention_duration = optional(number)
retention_unit = optional(string) # days

Outputs

Name Description
account_ids The account IDs that the bucket belongs to.
bucket_ids A map of bucket names to their unique IDs.
bucket_revisions A map of bucket names to their revision numbers.

About

[MIRROR] Terraform module for managing backblaze

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages