Code Monkey home page Code Monkey logo

terraform-aws-bastion-host's Introduction

About

Creates bastion host with allowed SSH access from specific IPs.

Features:

  • Allow access from specific CIDRs (Default is 0.0.0.0/0)

Requirements

Terraform >=0.12 required. You can use release v0.3.1 for older versions

Usage

Default

module "bastion" {
  source            = "github.com/jetbrains-infra/terraform-aws-bastion-host"
  subnet_id         = aws_subnet.public.id
  ssh_key           = "ssh_key_name"
  internal_networks = ["10.0.10.0/24", module.vpc.subnet_internal1_cidr_block]
  project           = "myProject"
}

All params

module "bastion" {
  source            = "github.com/jetbrains-infra/terraform-aws-bastion-host"  
  subnet_id         = aws_subnet.public.id
  ssh_key           = "ssh_key_name"
  allowed_hosts     = ["11.22.33.44/32", "99.88.77.66/24"]
  internal_networks = ["10.0.10.0/24", module.vpc.subnet_internal1_cidr_block]
  disk_size         = 10
  instance_type     = "t2.micro"
  project           = "myProject"
}

Params

  • subnet_id - The VPC Subnet ID to launch in.
  • ssh_key - The key name of the Key Pair to use for the instance.
  • allowed_hosts - CIDR blocks of trusted networks.
  • internal_networks - Internal network CIDR blocks.
  • project - The value for tag project.

Optional params with default values

  • disk_size - The size of the root volume in gigabytes (Default 10).
  • instance_type - The type of instance to start (Default t2.micro).

Outputs

  • public_ip - bastion public IP
  • private_ip - bastion internal IP
  • instance_id - EC2 instance ID

terraform-aws-bastion-host's People

Contributors

sugdyzhekov avatar robusgauli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.