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

https://github.com/happypathway/terraform-aws-instance

Terraform Module
https://github.com/happypathway/terraform-aws-instance

module terraform terraform-managed

Last synced: 3 months ago
JSON representation

Terraform Module

Awesome Lists containing this project

README

        

[![Terraform Validation](https://github.com/HappyPathway/terraform-aws-instance/actions/workflows/terraform.yaml/badge.svg)](https://github.com/HappyPathway/terraform-aws-instance/actions/workflows/terraform.yaml)

## Requirements

| Name | Version |
|------|---------|
| [aws](#requirement\_aws) | ~> 5.62.0 |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | 5.62.0 |
| [null](#provider\_null) | 3.2.2 |
| [tls](#provider\_tls) | 4.0.5 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_iam_instance_profile.instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_instance_profile) | resource |
| [aws_iam_role.instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy.instance](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_instance.linux](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource |
| [aws_key_pair.deployer](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair) | resource |
| [aws_secretsmanager_secret.ssh_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/secretsmanager_secret) | resource |
| [aws_secretsmanager_secret_version.ssh_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/secretsmanager_secret_version) | resource |
| [null_resource.linux_instance_provisioner](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [tls_private_key.ssh](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
| [aws_iam_policy_document.assume_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [ami](#input\_ami) | The AMI to use | `string` | n/a | yes |
| [config](#input\_config) | Directory and script details for automation |

object({
content = string
script = string
args = optional(string, "")
})
| `null` | no |
| [ebs\_block\_devices](#input\_ebs\_block\_devices) | The EBS block devices to attach |
list(object({
delete_on_termination = optional(bool, true)
device_name = string
encrypted = optional(bool, false)
iops = optional(number, null)
kms_key_id = optional(string, null)
snapshot_id = optional(string, null)
tags = optional(map(string), {})
throughput = optional(number, null)
volume_size = optional(number, 100)
volume_type = optional(string, "gp2")
}))
| `[]` | no |
| [enable\_public\_ip](#input\_enable\_public\_ip) | Enable public IP | `bool` | `false` | no |
| [iam\_instance\_profile](#input\_iam\_instance\_profile) | The IAM instance profile to use | `string` | `null` | no |
| [iam\_policy](#input\_iam\_policy) | The IAM policy to use | `string` | `null` | no |
| [instance\_count](#input\_instance\_count) | The number of instances to create | `number` | `1` | no |
| [instance\_type](#input\_instance\_type) | The instance type to use | `string` | n/a | yes |
| [project\_name](#input\_project\_name) | The name of the project | `string` | n/a | yes |
| [required\_tags](#input\_required\_tags) | The required tags for the resources | `map(string)` | n/a | yes |
| [root\_block\_device](#input\_root\_block\_device) | The root\_block\_device block supports the following: delete\_on\_termination - (Optional) Whether the volume should be destroyed on instance termination. Defaults to true. encrypted - (Optional) Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection. iops - (Optional) Amount of provisioned IOPS. Only valid for volume\_type of io1, io2 or gp3. kms\_key\_id - (Optional) Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection. tags - (Optional) Map of tags to assign to the device. throughput - (Optional) Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume\_type of gp3. volume\_size - (Optional) Size of the volume in gibibytes (GiB). volume\_type - (Optional) Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses. |
object({
delete_on_termination = optional(bool, true)
encrypted = optional(bool, false)
iops = optional(number, null)
kms_key_id = optional(string, null)
tags = optional(map(string), {})
throughput = optional(number, null)
volume_size = optional(number, 100)
volume_type = optional(string, "gp3")
})
| n/a | yes |
| [secret\_path](#input\_secret\_path) | The secret path | `string` | `null` | no |
| [security\_group\_ids](#input\_security\_group\_ids) | The security group ids to use | `list(string)` | n/a | yes |
| [ssh\_user](#input\_ssh\_user) | The ssh user to use | `string` | `null` | no |
| [store\_key](#input\_store\_key) | Store the key in secrets manager | `bool` | `false` | no |
| [subnet](#input\_subnet) | List of subnet IDs | `string` | n/a | yes |
| [troubleshoot](#input\_troubleshoot) | Enable troubleshooting | `bool` | n/a | yes |
| [user\_data](#input\_user\_data) | n/a | `string` | `null` | no |
| [user\_data\_replace\_on\_change](#input\_user\_data\_replace\_on\_change) | n/a | `bool` | `false` | no |
| [windows\_instance](#input\_windows\_instance) | Create a Windows instance | `bool` | n/a | yes |
| [winrm\_credentials](#input\_winrm\_credentials) | The winrm credentials |
object({
username = string
password = string
})
| `null` | no |

## Outputs

| Name | Description |
|------|-------------|
| [key\_data](#output\_key\_data) | n/a |
| [linux\_hosts](#output\_linux\_hosts) | n/a |
| [linux\_ssh](#output\_linux\_ssh) | n/a |