Skip to content

Commit

Permalink
Rename repo (#8)
Browse files Browse the repository at this point in the history
* Rename Repo

* Fix `README.md` and `variables.tf`

* Fix `README.md`
  • Loading branch information
aknysh authored Sep 24, 2017
1 parent e5e377b commit 7d7c6f7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ keys/*
secrets.tfvars
*.tfvars
.terraform
.idea
*.iml
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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" {
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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.
4 changes: 3 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 7d7c6f7

Please sign in to comment.