An open API service indexing awesome lists of open source software.

https://github.com/dodevops/terraform-azure-velero

Highly opinionated management of Kubernetes backup with velero on AKS (Azure Kubernetes Service)
https://github.com/dodevops/terraform-azure-velero

Last synced: 6 months ago
JSON representation

Highly opinionated management of Kubernetes backup with velero on AKS (Azure Kubernetes Service)

Awesome Lists containing this project

README

          

# Terraform management of velero backup on AKS

## Introduction

This module manages velero backup on AKS (Azure Kubernetes Service)

## Usage

Instantiate the module by calling it from Terraform like this:

```hcl
module "azure-velero" {
source = "dodevops/velero/azure"
version = ""
}
```

## Requirements

The following requirements are needed by this module:

- terraform (>=1.3.9)

- azurerm (>=3.81.0)

- helm (>=2.4.1)

- kubernetes (>=2.8.0)

## Providers

The following providers are used by this module:

- azurerm (>=3.81.0)

- helm (>=2.4.1)

- kubernetes (>=2.8.0)

## Modules

No modules.

## Resources

The following resources are used by this module:

- [azurerm_role_assignment.storage-blob-data-contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) (resource)
- [azurerm_storage_account.storaccbackup](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account) (resource)
- [azurerm_storage_container.storcontbackup](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_container) (resource)
- [helm_release.velero](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) (resource)
- [kubernetes_namespace.velero](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) (resource)

## Required Inputs

The following input variables are required:

### backup\_sp\_id

Description: Service principal ID used for backup

Type: `string`

### backup\_sp\_secret

Description: Secret of the backup service principal

Type: `string`

### backup\_tenant\_id

Description: Tenant ID of the backup application

Type: `string`

### location

Description: Azure location to use for the backup

Type: `string`

### project

Description: Three letter project key

Type: `string`

### resource\_group

Description: Azure Resource Group to use

Type: `string`

### stage

Description: Stage for this ip

Type: `string`

### subscription\_id

Description: The Subscription ID to use

Type: `string`

## Optional Inputs

The following input variables are optional (have default values):

### azure\_velero\_plugin\_version

Description: Version of the azure velero plugin to use

Type: `string`

Default: `"v1.8.1"`

### backup\_sp\_objectid

Description: Service principal object ID used for backup. In case an application is used, the service principal object id of the
app is required as shown in the Enterprise Applications blade."

Type: `string`

Default: `""`

### create\_role\_assignment

Description: Create a storage-blob-data-contributor role assignment
(required with this error https://medium.com/datadigest/resolving-an-authorizationpermissionmismatch-from-the-azure-file-copy-task-v4-in-azure-pipelines-654536fe3af5)
If a app is used as the backup sp, also provide the app object id.

Type: `bool`

Default: `false`

### exclude\_namespaces

Description: A list of namespaces to exclude from velero backup

Type: `list(string)`

Default:

```json
[
"velero",
"kube-system",
"kube-public",
"kube-node-lease"
]
```

### include\_namespaces

Description: A list of namespaces to include in velero backup

Type: `list(string)`

Default:

```json
[
"*"
]
```

### kubernetes\_resource\_group

Description: Resource group of the Kubernetes resources to use (defaults to resource\_group)

Type: `string`

Default: `""`

### schedule

Description: Schedule for the cronjob

Type: `string`

Default: `"0 0 * * *"`

### snapshots\_enabled

Description: Enable Velero snapshots

Type: `bool`

Default: `true`

### ttl

Description: Time to live for the backup in form of hms (example for 14 days: 336h0m0s)

Type: `string`

Default: `"336h0m0s"`

### velero\_version

Description: Velero Helm Chart version to use

Type: `string`

Default: `"5.1.4"`

## Outputs

The following outputs are exported:

### storage\_account\_name

Description: The name of the created backup storage account

### storage\_container\_name

Description: The name of the created backup storage container

## Development

Use [the terraform module tools](https://github.com/dodevops/terraform-module-tools) to check and generate the documentation by running

docker run -v "$PWD":/terraform ghcr.io/dodevops/terraform-module-tools:latest