|
1 | 1 | <!-- BEGIN_TF_DOCS -->
|
2 |
| -# Terraform Module for Hosts on ENTER\_INFRA\_PROVIDER |
| 2 | +# Terraform Module for AWS Hosts |
3 | 3 |
|
4 |
| -> [!IMPORTANT] |
5 |
| -> This readme is automation generated using the [`terraform-docs`](https://terraform-docs.io/) command with the static contenta taken from [doc\_fragments/header.md](doc\_fragments/header.md) |
6 |
| -
|
7 |
| -The `hosts` module contains resource files to provision and manage <ENTER\_INFRA\_PROVIDER> instances with flexible configuration options for compute resources, storage volumes, and networking. This module is designed for Cloudera on premise infrastructure deployments on <ENTER\_INFRA\_PROVIDER>. |
| 4 | +The `hosts` module contains resource files to provision and manage AWS EC2 instances with flexible configuration options for compute resources, storage volumes, and networking. This module is designed for Cloudera on premise infrastructure deployments on AWS IaaS but can be used for any AWS EC2 instance provisioning needs. |
8 | 5 |
|
9 | 6 | ## Key Features
|
10 | 7 |
|
11 |
| -<ENTER\_KEY\_FEATURES> |
| 8 | +- **Flexible Instance Provisioning**: Create single instances or multiple identical nodes with sequential naming |
| 9 | +- **Custom Storage Configuration**: Attach and manage additional EBS volumes with configurable size, type, and mount points |
| 10 | +- **Network Integration**: Place instances in specific subnets with optional public IP assignment |
| 11 | +- **Security Management**: Apply security groups to control access to instances |
| 12 | +- **Resource Tagging**: Add custom tags to all provisioned resources for better organization and cost management |
| 13 | +- **IMDSv2 Support**: Automatic detection and configuration of IMDSv2 tokens based on AMI capabilities |
12 | 14 |
|
13 | 15 | ## Usage
|
14 | 16 |
|
15 | 17 | The [examples](./examples) directory has example of using this module:
|
16 | 18 |
|
17 |
| -* `ex01-minimal_inputs` demonstrates how this module can be used to create a number of hosts. |
| 19 | +* `ex01-minimal_inputs` demonstrates how this module can be used to create a number of EC2 instances. The [terraform-aws-network](../terraform-aws-network/README.md) module is also used as part of this example. |
18 | 20 |
|
19 | 21 | The sample `terraform.tfvars.sample` describes the required inputs for the example.
|
20 | 22 |
|
21 | 23 | ## Requirements
|
22 | 24 |
|
23 |
| -No requirements. |
| 25 | +| Name | Version | |
| 26 | +|------|---------| |
| 27 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 | |
| 28 | +| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.60.0 | |
24 | 29 |
|
25 | 30 | ## Providers
|
26 | 31 |
|
27 |
| -No providers. |
| 32 | +| Name | Version | |
| 33 | +|------|---------| |
| 34 | +| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 4.60.0 | |
28 | 35 |
|
29 | 36 | ## Modules
|
30 | 37 |
|
31 | 38 | No modules.
|
32 | 39 |
|
33 | 40 | ## Resources
|
34 | 41 |
|
35 |
| -No resources. |
| 42 | +| Name | Type | |
| 43 | +|------|------| |
| 44 | +| [aws_ebs_volume.inventory](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ebs_volume) | resource | |
| 45 | +| [aws_instance.pvc_base](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource | |
| 46 | +| [aws_volume_attachment.inventory](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment) | resource | |
| 47 | +| [aws_ami.pvc_base](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source | |
36 | 48 |
|
37 | 49 | ## Inputs
|
38 | 50 |
|
39 |
| -No inputs. |
| 51 | +| Name | Description | Type | Default | Required | |
| 52 | +|------|-------------|------|---------|:--------:| |
| 53 | +| <a name="input_image_id"></a> [image\_id](#input\_image\_id) | AMI image ID for the hosts | `string` | n/a | yes | |
| 54 | +| <a name="input_name"></a> [name](#input\_name) | Instance name. If 'quantity' is set, name will be <name>-NN. | `string` | n/a | yes | |
| 55 | +| <a name="input_security_groups"></a> [security\_groups](#input\_security\_groups) | List of security group IDs to attach to the instances | `list(string)` | n/a | yes | |
| 56 | +| <a name="input_ssh_key_pair"></a> [ssh\_key\_pair](#input\_ssh\_key\_pair) | SSH key pair name | `string` | n/a | yes | |
| 57 | +| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | List of subnet IDs to provision the instances | `list(string)` | n/a | yes | |
| 58 | +| <a name="input_instance_type"></a> [instance\_type](#input\_instance\_type) | Instance type name for the hosts | `string` | `"t2.micro"` | no | |
| 59 | +| <a name="input_offset"></a> [offset](#input\_offset) | Number offset for instance name | `number` | `0` | no | |
| 60 | +| <a name="input_public_ip"></a> [public\_ip](#input\_public\_ip) | Flag to assign public IP addresses to the hosts | `bool` | `false` | no | |
| 61 | +| <a name="input_quantity"></a> [quantity](#input\_quantity) | Number of instances. Defaults to a single instance without numbering (bare name). | `number` | `0` | no | |
| 62 | +| <a name="input_root_volume"></a> [root\_volume](#input\_root\_volume) | Root volume details | <pre>object({<br/> delete_on_termination = optional(bool, true)<br/> volume_size = optional(number, 100)<br/> volume_type = optional(string)<br/> })</pre> | `{}` | no | |
| 63 | +| <a name="input_tags"></a> [tags](#input\_tags) | Map of tags applied to all cloud-provider assets. | `map(any)` | `{}` | no | |
| 64 | +| <a name="input_volumes"></a> [volumes](#input\_volumes) | Additional storage volumes to attach to the hosts. Each volume is defined by a device name, mount point, size, type, and optional tags. | <pre>list(object({<br/> device_name = string<br/> mount = string<br/> volume_size = optional(number, 100)<br/> volume_type = optional(string, "gp2")<br/> tags = optional(map(string), {})<br/> }<br/> )<br/> )</pre> | `null` | no | |
40 | 65 |
|
41 | 66 | ## Outputs
|
42 | 67 |
|
43 |
| -No outputs. |
| 68 | +| Name | Description | |
| 69 | +|------|-------------| |
| 70 | +| <a name="output_hosts"></a> [hosts](#output\_hosts) | Hosts | |
| 71 | +| <a name="output_storage_volumes"></a> [storage\_volumes](#output\_storage\_volumes) | Additional Storage Volumes | |
44 | 72 | <!-- END_TF_DOCS -->
|
0 commit comments