Coder Social home page Coder Social logo

retpolanne / aws-security-group-add-ip-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sohelamin/aws-security-group-add-ip-action

1.0 0.0 0.0 221 KB

GitHub Action for AWS Security Group Add IP

Home Page: https://github.com/marketplace/actions/aws-security-group-add-ip

JavaScript 100.00%

aws-security-group-add-ip-action's Introduction

AWS Security Group Add IP Action

This action will add your public ip address to your given aws security group(s) with a description. If any ip address already exists with the description then it will update the address instead of adding. And it will remove the added ip address once the main job is completed.

Inputs

aws-access-key-id

Required AWS Access Key ID.

aws-secret-access-key

Required AWS Secret Access Key.

aws-region

Required AWS Region.

aws-security-group-id

Required AWS Security Group (comma separated if multiple).

protocol

The protocol which you want to allow. Default "tcp".

port

The port which you want to allow. Default "22".

to-port

The to port which you want to allow. Default "", leave it empty to allow only one port.

description

The descriptipn of your IP permission. Default "GitHub Action".

AWS IAM Policy

Make sure the IAM user that you have configured has the following policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "UpdateIngress",
            "Effect": "Allow",
            "Action": [
                "ec2:RevokeSecurityGroupIngress",
                "ec2:AuthorizeSecurityGroupIngress"
            ],
            "Resource": "arn:aws:ec2:your-region:your-account-id:security-group/your-security-group-id"
        },
        {
            "Sid": "DescribeGroups",
            "Effect": "Allow",
            "Action": "ec2:DescribeSecurityGroups",
            "Resource": "*"
        }
    ]
}

Replace your-region, your-account-id and your-security-group-id with appropiate values.

Example usage

- name: Add public IP to AWS security group
  uses: sohelamin/aws-security-group-add-ip-action@master
  with:
    aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
    aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    aws-region: 'us-east-1'
    aws-security-group-id: ${{ secrets.AWS_SECURITY_GROUP_ID }}
    port: '22'
    to-port: '30'
    protocol: 'tcp'
    description: 'GitHub Action'

aws-security-group-add-ip-action's People

Contributors

sohelamin avatar retpolanne avatar jtrimm007 avatar karolsojko avatar ptshih avatar dependabot[bot] avatar

Stargazers

 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.