Categorygithub.com/hadenlabs/terraform-aws-ec2-instance
module
0.0.0-20220826035018-1f6d503b2d1e
Repository: https://github.com/hadenlabs/terraform-aws-ec2-instance.git
Documentation: pkg.go.dev

# README

Latest Release Lint CI Test pre-commit Conventional Commits KeepAChangelog Terraform Version AWS Provider Version

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:

Usage

How to use this project

  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.

Requirements

NameVersion
terraform>= 0.13
aws>=3.2.0
null>=0.1.0

Providers

NameVersion
aws>=3.2.0
null>=0.1.0

Modules

No modules.

Resources

NameType
aws_instance.thisresource
aws_security_group.thisresource
aws_security_group_rule.egressresource
aws_security_group_rule.ingressresource
null_resource.provision_coreresource
null_resource.provision_dockerresource

Inputs

NameDescriptionTypeDefaultRequired
amiId of ami of awsstringn/ayes
aws_keyaws key pair namestringn/ayes
enabled_dockerenabled install dockerboolfalseno
instance_typetype instancestring"t2.micro"no
nameSolution name, e.g. 'app' or 'jenkins'stringn/ayes
private_keyprivate keystringn/ayes
rule_ingresslist rule for security group
list(object({
from_port = number
to_port = number
protocol = string
cidr_blocks = list(string)
}))
[]no
ssh_portport sshnumber22no
ssh_useruser sshstring"ubuntu"no
tagsAdditional tags (e.g. map('BusinessUnit','XYZ')map(string){}no

Outputs

NameDescription
instanceinstance instance.
private_ipprivate ip.
public_ippublic ip.

Help

Got a question?

File a GitHub issue.

Contributing

See Contributing.

Module Versioning

This Module follows the principles of Semantic Versioning (SemVer).

Using the given version number of MAJOR.MINOR.PATCH, we apply the following constructs:

  1. Use the MAJOR version for incompatible changes.
  2. Use the MINOR version when adding functionality in a backwards compatible manner.
  3. 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

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..

Don't forget to 🌟 Star 🌟 the repo if you like terraform-aws-ec2-instance

Your feedback is appreciated

# Packages

No description provided by the author
No description provided by the author