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 Terraform.
Overview
This provider allows users to manage repository backup definitions for GitHub and Azure DevOps using Cloudback's Operations API through Terraform configurations. It provides a seamless integration between Terraform and the Cloudback platform.
Features
Automated backup definition configuration for repositories
Infrastructure as Code approach to backup management
Multi-platform support (GitHub, Azure DevOps)
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 Keys page in the Cloudback dashboard.
Network Access: Ensure that your environment can reach Cloudback's endpoints:
https://app.cloudback.it/api/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 or project).
GitHub Example
Azure DevOps Repository Example
Azure DevOps Project Example
Attributes
platform
string
Yes
The platform. Values: GitHub, AzureDevOps
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 or Project
settings
object
Yes
The backup configuration settings
Subject Name Format
GitHub
Repository
repository-name
demo-repository
Azure DevOps
Repository
project-name/repository-name
my-project/demo-repo
Azure DevOps
Project
project-name
my-project
Settings Object
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 repository.
References
Last updated
Was this helpful?