qumulo_replication_object_relationship (Resource)¶
Manages an object replication relationship on a Qumulo cluster.
An object relationship enables replication between a Qumulo cluster directory and an S3-compatible object storage bucket. Data can be replicated either to the object store (backup) or from the object store (restore).
Example Usage¶
Installation¶
terraform {
required_providers {
qumulo = {
source = "qumulo-terraform-registry.s3.us-east-1.amazonaws.com/qumulo/qumulo"
version = "~> 1.0"
}
}
}
Copy to S3 (Backup)¶
resource "qumulo_replication_object_relationship" "backup" {
connection_profile = "prod"
direction = "COPY_TO_OBJECT"
local_directory_path = "/data/backup"
object_store_address = "s3.us-west-2.amazonaws.com"
bucket = "my-backup-bucket"
region = "us-west-2"
access_key_id = var.aws_access_key
secret_access_key = var.aws_secret_key
}
Copy from S3 (Restore)¶
resource "qumulo_replication_object_relationship" "restore" {
connection_profile = "prod"
direction = "COPY_FROM_OBJECT"
local_directory_path = "/data/restored"
object_store_address = "s3.us-west-2.amazonaws.com"
bucket = "my-backup-bucket"
object_folder = "daily-backup"
region = "us-west-2"
access_key_id = var.aws_access_key
secret_access_key = var.aws_secret_key
}
With Private S3-Compatible Storage¶
resource "qumulo_replication_object_relationship" "minio" {
connection_profile = "prod"
direction = "COPY_TO_OBJECT"
local_directory_path = "/data/archive"
object_store_address = "minio.internal.example.com"
port = 9000
bucket = "archive"
bucket_style = "BUCKET_STYLE_PATH"
ca_certificate = file("ca.pem")
access_key_id = var.minio_access_key
secret_access_key = var.minio_secret_key
}
Import¶
Existing relationships can be imported using connection_profile,id:
Important: After import, secret_access_key is set to an empty string because the
Qumulo REST API does not return it. This causes a perpetual diff on every terraform plan.
Add ignore_changes to suppress it:
resource "qumulo_replication_object_relationship" "backup" {
connection_profile = "prod"
secret_access_key = var.aws_secret_key
# ... other attributes ...
lifecycle {
ignore_changes = [secret_access_key]
}
}
Schema¶
Required¶
access_key_id(String) The access key ID for authenticating to the object store.bucket(String) The bucket in the object store to use for this relationship.connection_profile(String) Name of a connection profile defined in the provider block.
Connection profiles centralize cluster credentials at the provider level. Define profiles in the provider block:
provider "qumulo" {
connection_profiles = [
{
name = "prod"
endpoint = "https://cluster.example.com:8000"
username = "admin"
password = var.cluster_password
insecure_skip_verify = true # For self-signed certificates
}
]
}
direction (String) The direction of replication: COPY_TO_OBJECT (backup) or COPY_FROM_OBJECT (restore).
- local_directory_path (String) The path on this cluster for the object replication. This is write-only during creation; use local_directory_id for reads.
- object_store_address (String) The S3-compatible server address. For Amazon S3, use s3.secret_access_key (String, Sensitive) The secret access key for authenticating to the object store.
Optional¶
bucket_style(String) The addressing style for requests: BUCKET_STYLE_VIRTUAL_HOSTED (recommended for AWS S3) or BUCKET_STYLE_PATH.ca_certificate(String) The public certificate of the CA to trust for connections to the object store, in PEM format. If empty, the built-in trusted public CAs are used.object_folder(String) The folder within the bucket to use. Use empty string or '/' for the bucket root.port(Number) The HTTPS port for communicating with the object store. Defaults to 443.region(String) The region where the bucket is located.
Read-Only¶
id(String) The unique ID of the object replication relationship.local_directory_id(String) The file ID of the local directory (computed from local_directory_path).