-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
README.yaml
126 lines (101 loc) · 4.88 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#
# 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-admin-server
# Tags of this project
tags:
- aws
- terraform
- terraform-modules
- platform
- ec2
- admin-server
- instance
- security
- ansible
- bastion
- ssh
# Categories of this project
categories:
- terraform-modules/platform
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Canonical GitHub repo
github_repo: cloudposse/terraform-aws-ec2-admin-server
# Badges to display
badges:
- name: Latest Release
image: https://img.shields.io/github/release/cloudposse/terraform-aws-ec2-admin-server.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-ec2-admin-server/releases/latest
- name: Last Updated
image: https://img.shields.io/github/last-commit/cloudposse/terraform-aws-ec2-admin-server.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-ec2-admin-server/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: "bastion"
description: "🔒Secure Bastion implemented as Docker Container running Alpine Linux with Google Authenticator & DUO MFA support"
url: "https://github.com/cloudposse/bastion"
- 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"
# Short description of this project
description: |-
Terraform Module for providing a server capable of running admin tasks. Use `terraform-aws-ec2-admin-server` to create and manage an admin instance.
# How to use this project
usage: |-
Note: add `${var.ssh_key_pair}` private key to the `ssh agent`.
Include this repository as a module in your existing terraform code:
```terraform
module "admin_tier" {
source = "git::https://github.com/cloudposse/terraform-aws-ec2-admin-server.git?ref=master"
ssh_key_pair = "${var.ssh_key_pair}"
github_api_token = "${var.github_api_token}"
github_organization = "${var.github_organization}"
github_team = "${var.github_team}"
instance_type = "${var.instance_type}"
vpc_id = "${var.vpc_id}"
name = "admin"
namespace = "${var.namespace}"
stage = "${var.stage}"
subnets = ["${var.subnets}"]
zone_id = "${module.terraform-aws-route53-cluster-zone.zone_id}"
security_groups = ["${var.security_groups}"]
allow_cidr_blocks = ["${var.allow_cidr_blocks}"]
}
```
### Module `terraform-aws-route53-cluster-zone`
Module `terraform-aws-ec2-admin-server` requires another module to be used additionally - `terraform-aws-route53-cluster-zone`.
`terraform-aws-ec2-admin-server` uses `terraform-aws-route53-cluster-hostname` to create a DNS record for created host. `terraform-aws-route53-cluster-hostname` module needs `zone_id` parameter as an input, and this parameter actually is an output from `terraform-aws-route53-cluster-zone`.
That is why `terraform-aws-route53-cluster-zone` should be implemented in `root` TF manifest when we need `terraform-aws-ec2-admin-server`.
### This module depends on the next modules:
* [terraform-null-label](https://github.com/cloudposse/terraform-null-label)
* [terraform-aws-ubuntu-github-authorized-keys-user-data](https://github.com/cloudposse/terraform-aws-ubuntu-github-authorized-keys-user-data)
* [terraform-aws-route53-cluster-hostname](https://github.com/cloudposse/terraform-aws-route53-cluster-hostname)
* [terraform-aws-route53-cluster-zone](https://github.com/cloudposse/terraform-aws-route53-cluster-zone) (not directly, but `terraform-aws-route53-cluster-hostname` need child `zone_id`)
It is necessary to run `terraform get` to download those modules.
Now reference the label when creating an instance (for example):
```terraform
resource "aws_ami_from_instance" "example" {
name = "terraform-example"
source_instance_id = "${module.admin_tier.id}"
}
```
references:
- name: "terraform-aws-ec2-bastion-server"
description: "Thanks for the inspiration"
url: "https://github.com/cloudposse/terraform-aws-ec2-bastion-server"
include:
- "docs/targets.md"
- "docs/terraform.md"
# Contributors to this project
contributors: []