Skip to content

dapperlabs-platform/terraform-google-gcs-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example

module "bucket_backup" {
  source             = "github.com/dapperlabs-platform/terraform-google-gcs-backup?ref=main"
  project_id         = "project_id"
  name               = "bucket-backup"
  location           = "US"
  source_bucket_name = "some_other_bucket"
  storage_class      = "STANDARD"
  autoclass          = true
  versioning         = true
}

Requirements

Name Version
terraform >= 1.3.8
google >= 4.55

Providers

Name Version
google >= 4.55

Modules

No modules.

Resources

Name Type
google_project_iam_custom_role.storagetransfer_bucket_get resource
google_project_iam_custom_role.storagetransfer_serviceaccount_project resource
google_project_iam_member.transfer_buckets_list resource
google_storage_bucket.bucket resource
google_storage_bucket_iam_member.members resource
google_storage_bucket_iam_member.transfer_backup_bucket resource
google_storage_bucket_iam_member.transfer_backup_bucket_get resource
google_storage_bucket_iam_member.transfer_source_bucket resource
google_storage_bucket_iam_member.transfer_source_bucket_get resource
google_storage_transfer_job.bucket_nightly_backup resource
google_project.project data source
google_storage_transfer_project_service_account.default data source

Inputs

Name Description Type Default Required
autoclass Automatically transitions objects in your bucket to appropriate storage classes based on each object's access pattern. Defaults to false. bool false no
encryption_key KMS key that will be used for encryption. string null no
force_destroy Optional map to set force destroy keyed by name, defaults to false. bool false no
iam IAM bindings in {ROLE => [MEMBERS]} format. map(list(string)) {} no
labels Labels to be attached to all buckets. map(string) {} no
lifecycle_rule Bucket lifecycle rule.
object({
action = object({
type = string
storage_class = optional(string, null)
})
condition = object({
age = optional(number, null)
created_before = optional(string, null)
with_state = optional(string, null)
matches_storage_class = optional(string, null)
matches_prefix = optional(string, null)
matches_suffix = optional(string, null)
num_newer_versions = optional(number, null)
custom_time_before = optional(string, null)
days_since_custom_time = optional(number, null)
days_since_noncurrent_time = optional(number, null)
noncurrent_time_before = optional(string, null)
})
})
null no
location Bucket location. string "US" no
logging_config Bucket logging configuration.
object({
log_bucket = string
log_object_prefix = string
})
null no
name Bucket name suffix. string n/a yes
prefix Prefix used to generate the bucket name. string null no
project_id Bucket project id. string n/a yes
public_access_prevention Prevents public access to a bucket. Acceptable values are inherited or enforced. If inherited, the bucket uses public access prevention, only if the bucket is subject to the public access prevention organization policy constraint. string "inherited" no
retention_policy Bucket retention policy.
object({
retention_period = number
is_locked = bool
})
null no
schedule Schedule for the backup job.
object({
schedule_start_date = object({
year = number
month = number
day = number
})
schedule_end_date = object({
year = number
month = number
day = number
})
start_time_of_day = object({
hours = number
minutes = number
seconds = number
nanos = number
})
repeat_interval = string
})
{
"repeat_interval": null,
"schedule_end_date": null,
"schedule_start_date": {
"day": 1,
"month": 1,
"year": 2021
},
"start_time_of_day": null
}
no
source_bucket_name Name of the bucket to backup. string n/a yes
storage_class Bucket storage class. string "MULTI_REGIONAL" no
uniform_bucket_level_access Allow using object ACLs (false) or not (true, this is the recommended behavior) , defaults to true (which is the recommended practice, but not the behavior of storage API). bool true no
versioning Enable versioning, defaults to false. bool false no

Outputs

Name Description
bucket Bucket resource.
name Bucket name.
url Bucket URL.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages