Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hadenlabs/terraform-aws-ec2-instance
A Terraform module to create instance ec2 on Amazon Web Services (AWS).
https://github.com/hadenlabs/terraform-aws-ec2-instance
aws ec2 hadenlabs instance modules peru terraform terraform-modules
Last synced: 1 day ago
JSON representation
A Terraform module to create instance ec2 on Amazon Web Services (AWS).
- Host: GitHub
- URL: https://github.com/hadenlabs/terraform-aws-ec2-instance
- Owner: hadenlabs
- License: lgpl-3.0
- Created: 2021-04-14T08:43:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-25T01:06:46.000Z (about 2 years ago)
- Last Synced: 2024-09-22T05:02:33.871Z (6 days ago)
- Topics: aws, ec2, hadenlabs, instance, modules, peru, terraform, terraform-modules
- Language: HCL
- Homepage:
- Size: 212 KB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: docs/contributing.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: docs/code_of_conduct.md
Awesome Lists containing this project
README
[![Latest Release](https://img.shields.io/github/release/hadenlabs/terraform-aws-ec2-instance)](https://github.com/hadenlabs/terraform-aws-ec2-instance/releases) [![Lint](https://img.shields.io/github/workflow/status/hadenlabs/terraform-aws-ec2-instance/lint-code)](https://github.com/hadenlabs/terraform-aws-ec2-instance/actions?workflow=lint-code) [![CI](https://img.shields.io/github/workflow/status/hadenlabs/terraform-aws-ec2-instance/ci)](https://github.com/hadenlabs/terraform-aws-ec2-instance/actions?workflow=ci) [![Test](https://img.shields.io/github/workflow/status/hadenlabs/terraform-aws-ec2-instance/test)](https://github.com/hadenlabs/terraform-aws-ec2-instance/actions?workflow=test) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow)](https://conventionalcommits.org) [![KeepAChangelog](https://img.shields.io/badge/changelog-Keep%20a%20Changelog%20v1.0.0-orange)](https://keepachangelog.com) [![Terraform Version](https://img.shields.io/badge/terraform-1.x%20|%200.15%20|%200.14%20|%200.13%20|%200.12.20+-623CE4.svg?logo=terraform)](https://github.com/hashicorp/terraform/releases) [![AWS Provider Version](https://img.shields.io/badge/AWS-3%20and%202.0+-F8991D.svg?logo=terraform)](https://github.com/terraform-providers/terraform-provider-aws/releases)
# terraform-aws-ec2-instance
terraform-aws-ec2-instance for project
## Requirements
This is a list of plugins that need to be installed previously to enjoy all the goodies of this configuration:
- [terraform](https://github.com/hashicorp/terraform)
- [python](https://www.python.org)
- [taskfile](https://github.com/go-task/task)## Usage
# How to use this project
```hcl
module "key" {
source = "hadenlabs/key-pair/aws"
version = ">=0.1"
name = "name-key"
public_key = var.public_key
}resource "aws_default_vpc" "default" {
tags = var.tags
}resource "aws_subnet" "this" {
vpc_id = aws_default_vpc.default.id
cidr_block = "172.30.9.0/24"
map_public_ip_on_launch = true
tags = module.tags.tags
}module "main" {
depends_on = [
module.key,
]source = "hadenlabs/ec2-instance/aws"
version = "0.2.0"
name = "name-server"
ami = data.aws_ami.amazon_linux.id
private_key = var.private_key
aws_key = module.key.name
}
```Full working examples can be found in [examples](./examples) folder.
## Requirements
| Name | Version |
| ------------------------------------------------------------------------ | ------- |
| [terraform](#requirement_terraform) | >= 0.13 |
| [aws](#requirement_aws) | >=3.2.0 |
| [null](#requirement_null) | >=0.1.0 |## Providers
| Name | Version |
| --------------------------------------------------- | ------- |
| [aws](#provider_aws) | >=3.2.0 |
| [null](#provider_null) | >=0.1.0 |## Modules
No modules.
## Resources
| Name | Type |
| --- | --- |
| [aws_instance.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance) | resource |
| [aws_security_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_security_group_rule.egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.ingress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [null_resource.provision_core](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [null_resource.provision_docker](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |## Inputs
| Name | Description | Type | Default | Required |
| --- | --- | --- | --- | :-: |
| [ami](#input_ami) | Id of ami of aws | `string` | n/a | yes |
| [aws_key](#input_aws_key) | aws key pair name | `string` | n/a | yes |
| [enabled_docker](#input_enabled_docker) | enabled install docker | `bool` | `false` | no |
| [instance_type](#input_instance_type) | type instance | `string` | `"t2.micro"` | no |
| [name](#input_name) | Solution name, e.g. 'app' or 'jenkins' | `string` | n/a | yes |
| [private_key](#input_private_key) | private key | `string` | n/a | yes |
| [rule_ingress](#input_rule_ingress) | list rule for security group |list(object({| `[]` | no |
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
}))
| [ssh_port](#input_ssh_port) | port ssh | `number` | `22` | no |
| [ssh_user](#input_ssh_user) | user ssh | `string` | `"ubuntu"` | no |
| [tags](#input_tags) | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |## Outputs
| Name | Description |
| ----------------------------------------------------------------- | ------------------ |
| [instance](#output_instance) | instance instance. |
| [private_ip](#output_private_ip) | private ip. |
| [public_ip](#output_public_ip) | public ip. |## Help
**Got a question?**
File a GitHub [issue](https://github.com/hadenlabs/terraform-aws-ec2-instance/issues).
## Contributing
See [Contributing](./docs/contributing.md).
## Module Versioning
This Module follows the principles of [Semantic Versioning (SemVer)](https://semver.org/).
Using the given version number of `MAJOR.MINOR.PATCH`, we apply the following constructs:
1. Use the `MAJOR` version for incompatible changes.
1. Use the `MINOR` version when adding functionality in a backwards compatible manner.
1. Use the `PATCH` version when introducing backwards compatible bug fixes.### Backwards compatibility in `0.0.z` and `0.y.z` version
- In the context of initial development, backwards compatibility in versions `0.0.z` is **not guaranteed** when `z` is increased. (Initial development)
- In the context of pre-release, backwards compatibility in versions `0.y.z` is **not guaranteed** when `y` is increased. (Pre-release)## Copyright
Copyright © 2018-2022 [Hadenlabs](https://hadenlabs.com)
## Trademarks
All other trademarks referenced herein are the property of their respective owners.
## License
The code and styles are licensed under the LGPL-3.0 license [See project license.](LICENSE).
## Don't forget to 🌟 Star 🌟 the repo if you like terraform-aws-ec2-instance
[Your feedback is appreciated](https://github.com/hadenlabs/terraform-aws-ec2-instance/issues)