Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconattach-eni
file-type-iconbastion-host
file-type-iconec2-backup
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvariables.tf
file-type-iconpersistent-ebs-volume
file-type-iconroute53-helpers
file-type-iconmodules
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.adoc
file-type-iconcore-concepts.md
file-type-iconterraform-cloud-enterprise-private-module-...

Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconattach-eni
file-type-iconbastion-host
file-type-iconec2-backup
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvariables.tf
file-type-iconpersistent-ebs-volume
file-type-iconroute53-helpers
file-type-iconmodules
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.adoc
file-type-iconcore-concepts.md
file-type-iconterraform-cloud-enterprise-private-module-...
Single EC2 Instance

Single EC2 Instance

Run a single EC2 instance for stateless or stateful apps. Supports IAM roles, EBS volumes, ENIs, and EIPs.

Code Preview

Preview the Code

mobile file icon

README.md

down

EC2 Backup Example

This folder contains an example of how to create an EC2 backup policy that will create snapshots from targeted EBS volumes on a configurable schedule.

This is useful for quickly and repeatbly configuring backup policies to protect against data loss or to ensure that you always have regular backups to launch instances from.

For ease of use and to help you get up and running quickly, this example will first create an EBS volume of 2GB in size.

This EBS volume is tagged with the same tag that the backup module is configured to target. This means that the data lifecycle manager that is created will find the created EBS at the configured snapshot time.

How do you run this example?

  1. Install Terraform.
  2. You can run this example as written without needing to configure any variables. If you want to change the variables to gain a better understanding of how the module works, you can open variables.tf
  3. terraform init.
  4. terraform apply.

Terraform will output the ARN of the data lifecycle manager that was created, along with the ARN of the IAM role that was associated with it and the role's name.

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?