Terraform module to simplify backblaze setup of groups and projects.
| Name | Version |
|---|---|
| terraform | >= 1.14 |
| b2 | ~> 0.8 |
| Name | Version |
|---|---|
| b2 | 0.12.0 |
No modules.
| Name | Type |
|---|---|
| b2_bucket.buckets | resource |
| 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({ |
governance | none retention_duration = optional(number) retention_unit = optional(string) # days |
| 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. |