GithubHelp home page GithubHelp logo

yukihira1992 / terraform-aws-simple-sg Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 7 KB

Terraform module which creates Security Group on AWS.

Home Page: https://registry.terraform.io/modules/yukihira1992/simple-sg

License: MIT License

HCL 100.00%
terraform-module aws-security-group security-group vpc terraform aws

terraform-aws-simple-sg's Introduction

terraform-aws-simple-sg

Terraform module which creates Security Group on AWS.

Usage

# Web server allows all http/https traffic.

module "web_server" {
  source = "yukihira1992/simple-sg/aws"

  tags = {
    Name = "web-server"
    Environment = "dev"
  }

  ingress_rules = [
    {
      port = 80
      cidr_blocks = [
        "0.0.0.0/0",
      ]
    },
    {
      port = 443
      cidr_blocks = [
        "0.0.0.0/0",
      ]
    },
  ]
}

# DB server only allows mysql access from Web server.

module "db_server" {
  source = "yukihira1992/simple-sg/aws"

  tags = {
    Name = "db-server"
    Environment = "dev"
  }

  ingress_rules = [
    {
      port = 3306
      security_groups = [
        module.web_server.id,
      ],
    },
  ]
}

Inputs

Name Description Type Default Required
name The name of the security group. string null no
name_prefix Creates a unique name beginning with the specified prefix. Conflicts with name. string null no
description The security group description. string null no
ingress_rules A list of ingress rule mappings. list(any) yes
egress_rules A list of eggress rule mappings. Defaults to allow all traffic. list(any) Allow all traffic. no
vpc_id The VPC ID string null no
tags A mapping of tags to assign to the resource. map(string) {} no

Outputs

Name Description
id The ID of the security group.
arn The ARN of the security group.
name The name of the security group.

terraform-aws-simple-sg's People

Contributors

yukihira1992 avatar

Watchers

 avatar  avatar

Forkers

ryanoatz99

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.