terraform-aws-ec2-instance for project
This is a list of plugins that need to be installed previously to enjoy all the goodies of this configuration:
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 folder.
Name | Version |
---|---|
terraform | >= 0.13 |
aws | >=3.2.0 |
null | >=0.1.0 |
Name | Version |
---|---|
aws | >=3.2.0 |
null | >=0.1.0 |
No modules.
Name | Type |
---|---|
aws_instance.this | resource |
aws_security_group.this | resource |
aws_security_group_rule.egress | resource |
aws_security_group_rule.ingress | resource |
null_resource.provision_core | resource |
null_resource.provision_docker | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
ami | Id of ami of aws | string |
n/a | yes |
aws_key | aws key pair name | string |
n/a | yes |
enabled_docker | enabled install docker | bool |
false |
no |
instance_type | type instance | string |
"t2.micro" |
no |
name | Solution name, e.g. 'app' or 'jenkins' | string |
n/a | yes |
private_key | private key | string |
n/a | yes |
rule_ingress | list rule for security group | list(object({ |
[] |
no |
ssh_port | port ssh | number |
22 |
no |
ssh_user | user ssh | string |
"ubuntu" |
no |
tags | Additional tags (e.g. map('BusinessUnit','XYZ') |
map(string) |
{} |
no |
Name | Description |
---|---|
instance | instance instance. |
private_ip | private ip. |
public_ip | public ip. |
Got a question?
File a GitHub issue.
See Contributing.
This Module follows the principles of Semantic Versioning (SemVer).
Using the given version number of MAJOR.MINOR.PATCH
, we apply the following constructs:
- Use the
MAJOR
version for incompatible changes. - Use the
MINOR
version when adding functionality in a backwards compatible manner. - Use the
PATCH
version when introducing backwards compatible bug fixes.
- In the context of initial development, backwards compatibility in versions
0.0.z
is not guaranteed whenz
is increased. (Initial development) - In the context of pre-release, backwards compatibility in versions
0.y.z
is not guaranteed wheny
is increased. (Pre-release)
Copyright Β© 2018-2022 Hadenlabs
All other trademarks referenced herein are the property of their respective owners.
The code and styles are licensed under the LGPL-3.0 license See project license..