From e5e377babce46dd431b5d454ed1d288e4ea4d068 Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Fri, 22 Sep 2017 12:11:38 -0700 Subject: [PATCH] Rename Repo (#7) --- README.md | 18 ++++++++++-------- cloudformation.tf | 18 ++++++++++-------- iam.tf | 18 ++++++++++-------- main.tf | 2 +- s3.tf | 18 ++++++++++-------- 5 files changed, 41 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index cc02b89..22df1bd 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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}" @@ -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 diff --git a/cloudformation.tf b/cloudformation.tf index 2f8ba31..f16b1eb 100644 --- a/cloudformation.tf +++ b/cloudformation.tf @@ -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" { @@ -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" { diff --git a/iam.tf b/iam.tf index db34acc..9cc93a6 100644 --- a/iam.tf +++ b/iam.tf @@ -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" { @@ -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" { diff --git a/main.tf b/main.tf index ff1c7be..2ea7abf 100644 --- a/main.tf +++ b/main.tf @@ -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}" diff --git a/s3.tf b/s3.tf index 9a60d30..24035bf 100644 --- a/s3.tf +++ b/s3.tf @@ -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" { @@ -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" {