Terraform Provider

Explore the Cloudback Terraform Provider, an Infrastructure as Code (IaC) tool that enables automated management of backup configurations through Terraform.

The Cloudback Terraform Provider (terraform-provider-cloudback) is an Infrastructure as Code (IaC) tool that enables automated management of Cloudback backup configurations through Terraformarrow-up-right.

Overview

This provider allows users to manage backup definitions for all supported platforms using Cloudback's Operations API through Terraform configurations. It provides a smooth integration between Terraform and the Cloudback platform.

Features

  • Automated backup definition configuration for repositories

  • Infrastructure as Code approach to backup management

  • Multi-platform support

  • Support for Terraform-based workflow automation

Prerequisites

Before you begin, ensure that you have the following:

  • Terraform Installed: Version 1.0 or later is recommended.

  • Cloudback Account: An active account with appropriate permissions to create and manage backup resources.

  • API Key: Your API key for Cloudback's API. You can create one at the API Keysarrow-up-right page in the Cloudback dashboard.

  • Network Access: Ensure that your environment can reach Cloudback's endpoints: https://app.cloudback.it/ops/

Usage

Provider Configuration

Note: You can provide your API key either directly in the configuration or through the CLOUDBACK_API_KEY environment variable:

Resource: Backup Definition

Backup definitions are the primary resources managed by Cloudback. They represent the configuration for a specific backup subject (repository, project, or workspace).

GitHub Example

Azure DevOps Repository Example

Azure DevOps Project Example

GitLab Example

Linear Example

Attributes

Attribute
Type
Required
Description

platform

string

Yes

The platform. Values: GitHub, AzureDevOps, GitLab, Linear

account

string

Yes

The account or organization name

subject_name

string

Yes

The backup subject name (see format below)

subject_type

string

Yes

The backup subject type: Repository, Project, or Workspace

settings

object

Yes

The backup configuration settings

Subject Name Format

Platform
Subject Type
Format
Example

GitHub

Repository

repository-name

demo-repository

Azure DevOps

Repository

project-name/repository-name

my-project/demo-repo

Azure DevOps

Project

project-name

my-project

GitLab

Project

project-name

my-project

Linear

Workspace

workspace-name

my-workspace

Settings Object

Attribute
Type
Required
Description

enabled

bool

No

Whether automated backup is enabled

schedule

string

No

Backup schedule name (see listarrow-up-right)

storage

string

No

Storage location name (see listarrow-up-right)

retention

string

No

Retention policy: Last 30 days, Last 90 days, Last 180 days, Last 360 days

Backwards Compatibility

The repository attribute is still supported as an alias for subject_name with subject_type defaulting to Repository. However, using subject_name and subject_type is recommended for clarity, especially when working with Azure DevOps projects.

Documentation

For detailed documentation and examples, visit the official repositoryarrow-up-right.

References

Last updated

Was this helpful?