Skip to content

Commit

Permalink
Rename Repo (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
osterman authored Sep 22, 2017
1 parent 76ab626 commit e5e377b
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 33 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tf_efs_backup
# terraform-aws-efs-backup

This repo contains a terraform module for automatic EFS backup
Terraform module designed to easily backup EFS filesystems to S3 using DataPipeline.

The workflow is simple:
* Periodically launch resource (EC2 instance) based on schedule
Expand All @@ -12,11 +12,11 @@ The workflow is simple:

## Usage

Include this repository as a module in your existing terraform code:
Include this module in your existing terraform code:

```
```hcl
module "efs_backup" {
source = "git::https://github.com/cloudposse/tf_efs_backup.git?ref=master"
source = "git::https://github.com/cloudposse/terraform-aws-efs-backup.git?ref=master"
name = "${var.name}"
stage = "${var.stage}"
Expand Down Expand Up @@ -63,10 +63,12 @@ output "efs_backup_security_group" {



## Configuring your EFS filesystems to be backed up:
* Add security group ID from output `efs_backup_security_group`
to a security group of EFS Filesystems
## Integration with EFS

It's necessary to configure your EFS filesystem security groups to permit backups from the DataPipeline instances.

Add the security group ID from the `efs_backup_security_group` output to a security group of EFS Filesystems.

## References

* Thanks https://github.com/knakayama/datapipeline-efs-backup-demo for inspiration
18 changes: 10 additions & 8 deletions cloudformation.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module "sns_label" {
source = "git::https://github.com/cloudposse/tf_label.git?ref=0.1.0"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}-sns"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
attributes = ["sns"]
}

resource "aws_cloudformation_stack" "sns" {
Expand All @@ -15,10 +16,11 @@ resource "aws_cloudformation_stack" "sns" {
}

module "datapipeline_label" {
source = "git::https://github.com/cloudposse/tf_label.git?ref=0.1.0"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}-datapipeline"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
attributes = ["datapipeline"]
}

resource "aws_cloudformation_stack" "datapipeline" {
Expand Down
18 changes: 10 additions & 8 deletions iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ data "aws_iam_policy_document" "resource_role" {
}

module "resource_role_label" {
source = "git::https://github.com/cloudposse/tf_label.git?ref=0.1.0"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}-resource-role"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
attributes = ["resource-role"]
}

resource "aws_iam_role" "resource_role" {
Expand Down Expand Up @@ -51,10 +52,11 @@ data "aws_iam_policy_document" "role" {
}

module "role_label" {
source = "git::https://github.com/cloudposse/tf_label.git?ref=0.1.0"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}-role"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
attributes = ["role"]
}

resource "aws_iam_role" "role" {
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "aws" {
}

module "label" {
source = "git::https://github.com/cloudposse/tf_label.git?ref=0.1.0"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
Expand Down
18 changes: 10 additions & 8 deletions s3.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module "logs_label" {
source = "git::https://github.com/cloudposse/tf_label.git?ref=0.1.0"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}-logs"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
attributes = ["logs"]
}

resource "aws_s3_bucket" "logs" {
Expand All @@ -12,10 +13,11 @@ resource "aws_s3_bucket" "logs" {
}

module "backups_label" {
source = "git::https://github.com/cloudposse/tf_label.git?ref=0.1.0"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}-backups"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
attributes = ["backups"]
}

resource "aws_s3_bucket" "backups" {
Expand Down

0 comments on commit e5e377b

Please sign in to comment.