forked from cloudposse/terraform-aws-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.yaml
149 lines (140 loc) · 4.9 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: terraform-aws-backup
# Tags of this project
tags:
- aws
- terraform
- terraform-modules
- efs
- nfs
- terraform-modules
- backup
- backups
- aws-dynamodb
- aws-efs
- efs-backup
- efs-volume
- dynamodb
- dynamodb-backup
- rds
- rds-database
- rds-backup
- ebs
- ebs-backup
- ebs-volumes
# Categories of this project
categories:
- terraform-modules/networking
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Canonical GitHub repo
github_repo: cloudposse/terraform-aws-backup
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-backup.svg"
url: "https://github.com/cloudposse/terraform-aws-backup/releases/latest"
- name: "Slack Community"
image: "https://slack.cloudposse.com/badge.svg"
url: "https://slack.cloudposse.com"
related:
- name: "terraform-aws-efs"
description: "Terraform module to provision EFS file system"
url: "https://github.com/cloudposse/terraform-aws-efs"
- name: "terraform-aws-efs-backup"
description: "Terraform module to backup EFS filesystems to S3 using DataPipeline"
url: "https://github.com/cloudposse/terraform-aws-efs-backup"
- name: "terraform-aws-efs-cloudwatch-sns-alarms"
description: "Terraform module that configures CloudWatch SNS alerts for EFS"
url: "https://github.com/cloudposse/terraform-aws-efs-cloudwatch-sns-alarms"
# Short description of this project
description: |-
Terraform module to provision [AWS Backup](https://aws.amazon.com/backup), a fully managed backup service that makes it easy to centralize and automate
the back up of data across AWS services such as Amazon EBS volumes, Amazon EC2 instances, Amazon RDS databases, Amazon DynamoDB tables,
Amazon EFS file systems, and AWS Storage Gateway volumes.
# How to use this project
usage: |2-
For a complete example on how to backup an Elastic File System (EFS), see [examples/complete](examples/complete).
For automated tests of the complete example using [bats](https://github.com/bats-core/bats-core) and [Terratest](https://github.com/gruntwork-io/terratest)
(which tests and deploys the example on AWS), see [`test`](test).
```hcl
provider "aws" {
region = var.region
}
module "vpc" {
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.8.0"
namespace = var.namespace
stage = var.stage
name = var.name
attributes = var.attributes
tags = var.tags
delimiter = var.delimiter
cidr_block = "172.16.0.0/16"
}
module "subnets" {
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.16.0"
availability_zones = var.availability_zones
namespace = var.namespace
stage = var.stage
name = var.name
attributes = var.attributes
tags = var.tags
delimiter = var.delimiter
vpc_id = module.vpc.vpc_id
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
nat_gateway_enabled = false
nat_instance_enabled = false
}
module "efs" {
source = "git::https://github.com/cloudposse/terraform-aws-efs.git?ref=tags/0.10.0"
namespace = var.namespace
stage = var.stage
name = var.name
attributes = var.attributes
tags = var.tags
delimiter = var.delimiter
region = var.region
availability_zones = var.availability_zones
vpc_id = module.vpc.vpc_id
subnets = module.subnets.private_subnet_ids
security_groups = [module.vpc.vpc_default_security_group_id]
}
module "backup" {
source = "cloudposse/backup/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
namespace = var.namespace
stage = var.stage
name = var.name
attributes = var.attributes
tags = var.tags
delimiter = var.delimiter
backup_resources = [module.efs.arn]
schedule = var.schedule
start_window = var.start_window
completion_window = var.completion_window
cold_storage_after = var.cold_storage_after
delete_after = var.delete_after
}
```
include:
- "docs/targets.md"
- "docs/terraform.md"
# Contributors to this project
contributors:
- name: "Erik Osterman"
homepage: "https://github.com/osterman"
github: "osterman"
- name: "Andriy Knysh"
homepage: "https://github.com/aknysh/"
github: "aknysh"
- name: "Igor Rodionov"
homepage: "https://github.com/goruha/"
github: "goruha"