-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
README.yaml
110 lines (93 loc) · 3.9 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: terraform-aws-ec2-ami-snapshot
# Tags of this project
tags:
- aws
- terraform
- terraform-modules
- backups
- ami
- snapshot
- replica
# Categories of this project
categories:
- terraform-modules/backups
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Canonical GitHub repo
github_repo: cloudposse/terraform-aws-ec2-ami-snapshot
# Badges to display
badges:
- name: Latest Release
image: https://img.shields.io/github/release/cloudposse/terraform-aws-ec2-ami-snapshot.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-ec2-ami-snapshot/releases/latest
- name: Last Updated
image: https://img.shields.io/github/last-commit/cloudposse/terraform-aws-ec2-ami-snapshot.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-ec2-ami-snapshot/commits
- name: Slack Community
image: https://slack.cloudposse.com/for-the-badge.svg
url: https://slack.cloudposse.com
# List any related terraform modules that this module may be used with or that this module depends on.
related:
- name: "terraform-aws-ec2-ami-backup"
description: "Terraform module for automatic & scheduled AMI creation"
url: "https://github.com/cloudposse/terraform-aws-ec2-ami-backup"
- name: "terraform-aws-ec2-bastion-server"
description: "Terraform Module to define a generic Bastion host with parameterized user_data"
url: "https://github.com/cloudposse/terraform-aws-ec2-bastion-server"
- name: "terraform-aws-ec2-instance"
description: "Terraform Module for providing a general EC2 instance provisioned by Ansible"
url: "https://github.com/cloudposse/terraform-aws-ec2-instance"
- name: "terraform-aws-ec2-admin-server"
description: "Terraform Module for providing a EC2 instance capable of running admin tasks and provisioned by Ansible"
url: "https://github.com/cloudposse/terraform-aws-ec2-admin-server"
- name: "terraform-aws-ec2-cloudwatch-sns-alarms"
description: "Terraform module that configures CloudWatch SNS alerts for EC2 instances"
url: "https://github.com/cloudposse/terraform-aws-ec2-cloudwatch-sns-alarms"
- name: "terraform-aws-ec2-instance-group"
description: "Terraform Module for provisioning multiple general purpose EC2 hosts for stateful applications."
url: "https://github.com/cloudposse/terraform-aws-ec2-instance-group"
- name: "terraform-aws-ec2-instance-group"
description: "Terraform Module for provisioning multiple general purpose EC2 hosts for stateful applications."
url: "https://github.com/cloudposse/terraform-aws-ec2-instance-group"
# Short description of this project
description: |-
Terraform module to easily generate AMI snapshots to create replica instances
# How to use this project
usage: |-
### Create an AWS instance
```
resource "aws_instance" "default" {
ami = "ami-408c7f28"
instance_type = "t1.micro"
tags = {
Name = "test1"
}
}
```
### Create AMI from an AWS instance. Instance ID is required"
```
module "tf_ami_from_instance" {
source = "git::https://github.com/cloudposse/tf_ami_from_instance.git?ref=master"
source_instance_id = "${aws_instance.web.id}"
stage = "${var.stage}"
namespace = "${var.namespace}"
name = "${var.name}"
attributes = "${var.attributes}"
tags = "${var.tags}"
}
```
## Caveats
* Terraform will only keep the latest AMI snapshot (terraform will delete the previously generated AMI) See our Lamda based solution which avoids this pitfall: https://github.com/cloudposse/tf_lambda_ami_backup
* This is is not compatible with autoscaling groups
include:
- "docs/targets.md"
- "docs/terraform.md"
# Contributors to this project
contributors: []