From 7d7c6f73b4a3aa74ebee64d64943e82d80af6a42 Mon Sep 17 00:00:00 2001 From: Andriy Knysh Date: Sun, 24 Sep 2017 19:37:48 -0400 Subject: [PATCH] Rename repo (#8) * Rename Repo * Fix `README.md` and `variables.tf` * Fix `README.md` --- .gitignore | 2 ++ README.md | 16 ++++++++++++---- variables.tf | 4 +++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 1bd379d..e673710 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ keys/* secrets.tfvars *.tfvars .terraform +.idea +*.iml diff --git a/README.md b/README.md index 22df1bd..043de92 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ The workflow is simple: * Publish to the SNS topic that defined the success or failure of the activity * Automatic backup rotation using `S3 lifecycle rule` + ## Usage Include this module in your existing terraform code: @@ -24,11 +25,11 @@ module "efs_backup" { region = "${var.region}" vpc_id = "${var.vpc_id}" efs_mount_target_id = "${var.efs_mount_target_id}" - use_ip_address = true + use_ip_address = "true" noncurrent_version_expiration_days = "${var.noncurrent_version_expiration_days}" ssh_key_pair = "${var.ssh_key_pair}" datapipeline_config = "${var.datapipeline_config}" - modify_security_group = true + modify_security_group = "true" } output "efs_backup_security_group" { @@ -40,7 +41,7 @@ output "efs_backup_security_group" { ## Variables | Name | Default | Description | Required | -|:----------------------------------:|:--------------:|:-----------------------------------------------------------------------------------:|:--------:| +|:-----------------------------------|:--------------:|:------------------------------------------------------------------------------------|:--------:| | namespace | `` | Namespace (e.g. `cp` or `cloudposse`) | Yes | | stage | `` | Stage (e.g. `prod`, `dev`, `staging`) | Yes | | name | `` | Name (e.g. `efs-backup`) | Yes | @@ -53,10 +54,11 @@ output "efs_backup_security_group" { | ssh_key_pair | `` | A ssh key that will be deployed on DataPipeline's instance | Yes | | datapipeline_config | `${map("instance_type", "t2.micro", "email", "", "period", "24 hours")}"`| Essential Datapipeline configuration options | Yes | + ### `datapipeline_config` variables | Name | Default | Description | Required | -|:----------------------------------:|:--------------:|:-----------------------------------------------------------:|:--------:| +|:-----------------------------------|:--------------:|:------------------------------------------------------------|:--------:| | instance_type | `t2.micro` | Instance type to use | Yes | | email | `` | Email to use in SNS | Yes | | period | `24 hours` | Frequency of pipeline execution (frequency of backups) | Yes | @@ -69,6 +71,12 @@ It's necessary to configure your EFS filesystem security groups to permit backup 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 + + +## License + +Apache 2 License. See [`LICENSE`](LICENSE) for full details. diff --git a/variables.tf b/variables.tf index 566bcc6..3a8c629 100644 --- a/variables.tf +++ b/variables.tf @@ -8,8 +8,10 @@ variable "region" {} variable "vpc_id" {} +# https://www.terraform.io/docs/configuration/variables.html +# simply using string values rather than booleans for variables is recommended variable "use_ip_address" { - default = false + default = "false" } variable "datapipeline_config" {