### Run Built Cloudback Terraform Provider Binary Source: https://github.com/cloudback/terraform-provider-cloudback/blob/main/README.md Example of executing the compiled Cloudback Terraform provider binary located in the GOPATH bin directory to verify the build. ```sh $ $GOPATH/bin/terraform-provider-cloudback ``` -------------------------------- ### Configure Cloudback Terraform Provider Source: https://github.com/cloudback/terraform-provider-cloudback/blob/main/docs/index.md This example demonstrates how to configure the Cloudback Terraform provider, specifying the required provider source and setting the API endpoint and key for authentication. ```terraform terraform { required_providers { cloudback = { source = "cloudback/cloudback" } } } provider "cloudback" { endpoint = "https://app.cloudback.it" api_key = "your-api-key" } ``` -------------------------------- ### Build Cloudback Terraform Provider Source: https://github.com/cloudback/terraform-provider-cloudback/blob/main/README.md Navigate into the provider directory and execute the `make build` command to compile the Terraform provider binary. ```sh $ cd $GOPATH/src/github.com/cloudback/terraform-provider-cloudback $ make build ``` -------------------------------- ### Clone Cloudback Terraform Provider Repository Source: https://github.com/cloudback/terraform-provider-cloudback/blob/main/README.md Commands to create the necessary directory structure under GOPATH and clone the Cloudback Terraform provider repository from GitHub. ```sh $ mkdir -p $GOPATH/src/github.com/cloudback; cd $GOPATH/src/github.com/cloudback $ git clone git@github.com:cloudback:terraform-provider-cloudback ``` -------------------------------- ### Run Cloudback Terraform Provider Tests Source: https://github.com/cloudback/terraform-provider-cloudback/blob/main/README.md Command to execute the test suite for the Cloudback Terraform provider using `make test`. ```sh $ make test ``` -------------------------------- ### Terraform cloudback_backup_definition Resource Schema Source: https://github.com/cloudback/terraform-provider-cloudback/blob/main/docs/resources/backup_definition.md This API documentation outlines the structure and required attributes for the `cloudback_backup_definition` Terraform resource. It details top-level attributes like `account`, `platform`, and `repository`, as well as the nested `settings` block which includes `enabled`, `retention`, `schedule`, and `storage` fields for defining backup configurations. ```APIDOC cloudback_backup_definition (Resource): description: Cloudback backup definition resource Required: account (String): Account name platform (String): Platform name (e.g., GitHub, GitLab) repository (String): Repository name settings (Attributes): Nested Schema for settings: Required: enabled (Boolean): Whether the backup is scheduled retention (String): Retention policy name schedule (String): Backup schedule name storage (String): Storage name ``` -------------------------------- ### Configure and Use Cloudback Terraform Provider Source: https://github.com/cloudback/terraform-provider-cloudback/blob/main/README.md This HCL configuration block demonstrates how to declare the Cloudback provider, configure its endpoint and API key, and define a `cloudback_backup_definition` resource for a GitHub repository. It includes settings for enabling, scheduling, storage, and retention of backups. ```hcl terraform { required_providers { cloudback = { source = "cloudback/cloudback" } } } provider "cloudback" { endpoint = "https://app.cloudback.it" api_key = "your-api-key" } resource "cloudback_backup_definition" "example" { platform = "GitHub" # Currently only GitHub is supported account = "your-github-account" # The GitHub account that owns the repository repository = "your-github-repository" # The repository to backup settings = { enabled = true # Enable the scheduled automated backup schedule = "Daily at 6 am" # The schedule for the automated backup, see the Cloudback Dashboard for available options storage = "Your S3 bucket" # The storage name to use for the backup, see the Cloudback Dashboard for available options retention = "Last 30 days" # The retention policy for the backup, see the Cloudback Dashboard for available options } } ``` -------------------------------- ### Configure Terraform Local Provider Development Override Source: https://github.com/cloudback/terraform-provider-cloudback/blob/main/README.md HCL configuration for `.terraformrc` to instruct Terraform to use a locally built version of the Cloudback provider for development, specifying the absolute path to the provider binary. ```hcl provider_installation { dev_overrides { "cloudback/cloudback" = "/bin/" } } ``` -------------------------------- ### Cloudback Provider Schema Configuration Source: https://github.com/cloudback/terraform-provider-cloudback/blob/main/docs/index.md Details the optional configuration parameters for the Cloudback provider, including authentication via API key and specifying the API endpoint. ```APIDOC Schema: Optional: api_key: Type: String, Sensitive Description: The API key for authentication. May also be provided via CLOUDBACK_API_KEY environment variable. endpoint: Type: String Description: The API endpoint URL. May also be provided via CLOUDBACK_ENDPOINT environment variable. Default is https://app.cloudback.it. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.