Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rafikbahri/tf-aws-node

Terraform module for an EC2 instance
https://github.com/rafikbahri/tf-aws-node

aws terraform terraform-module

Last synced: 3 days ago
JSON representation

Terraform module for an EC2 instance

Awesome Lists containing this project

README

        

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.9.5 |
| [aws](#requirement\_aws) | >= 5.67.0 |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | 5.67.0 |
| [local](#provider\_local) | 2.5.2 |
| [tls](#provider\_tls) | 4.0.6 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_instance.instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource |
| [aws_key_pair.key-pair](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair) | resource |
| [aws_network_interface.interface](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_interface) | resource |
| [local_file.ssh-key](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file) | resource |
| [tls_private_key.tls-private-key](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
| [aws_iam_instance_profile.ssm_instance_profile](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_instance_profile) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [ami\_id](#input\_ami\_id) | AMI ID for the EC2 instance | `string` | `""` | no |
| [create\_key](#input\_create\_key) | Whether to create a key pair or not | `bool` | `true` | no |
| [has\_public\_ip](#input\_has\_public\_ip) | Whether the instance has a public IP address | `string` | `false` | no |
| [instance\_type](#input\_instance\_type) | EC2 instance type | `string` | `"t2.micro"` | no |
| [key\_name](#input\_key\_name) | Key pair name | `string` | `"key-pair"` | no |
| [private\_ips](#input\_private\_ips) | List of private IPs for this instance | `list(any)` | `[]` | no |
| [security\_groups](#input\_security\_groups) | List of security groups | `list(any)` | `[]` | no |
| [server\_count](#input\_server\_count) | Number of nodes to be created | `number` | `0` | no |
| [server\_prefix](#input\_server\_prefix) | Instance name prefix | `string` | `"ec2"` | no |
| [ssh\_enabled](#input\_ssh\_enabled) | Whether SSH access to the instance is enabled or not | `bool` | `true` | no |
| [subnet\_id](#input\_subnet\_id) | Associated subnet ID | `string` | `""` | no |
| [tags](#input\_tags) | Instance tags | `map(string)` | `{}` | no |
| [user\_data\_file](#input\_user\_data\_file) | User data file path | `string` | `""` | no |
| [vpc\_id](#input\_vpc\_id) | Associated VPC ID | `string` | `""` | no |

## Outputs

| Name | Description |
|------|-------------|
| [hostnames](#output\_hostnames) | List of hostnames (one per instance) |
| [identity\_file](#output\_identity\_file) | n/a |
| [instance\_id](#output\_instance\_id) | ID of the created EC2 instance |
| [private\_ips](#output\_private\_ips) | List of private/internal IPs |
| [private\_key](#output\_private\_key) | n/a |
| [public\_ip](#output\_public\_ip) | Public IP of the created EC2 instance |