> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# avvo/aws-white-list-circleci-ip

Add a custom script that gets the public ip address of the current box 
and calls the AWS CLI to add an inbound security rule on the fly. 
Then remove that rule at the end of the script.

This version is based on the configure/aws-white-list-circleci-ip@1.0.1
orb with changes/bug fixes.

* Support for specifying $IP environment variable. (Useful when the
  IP you are registering is a CircleCI remote docker engine, not
  the CircleCI container on which the orb is invoked.)
* Uses ifconfig.me rather than checkip.amazon.com to determine default
  value of IP address. Just in case the CircleCI environment runs
  somewhere other than Amazon.


## Commands

### add

This command will add a rule in the SG of the Kubernetes API to allow the ingress of the CircleCI Machine

| Parameter | Type | Default | Description |
|---|---|---|---|
| `description` | string | CircleCI | Description to identify the rule. |
| `mask` | integer | 32 | Mask to use for the ip address. |
| `port` | integer | 443 | Port to open for the inbound rule. |
| `tag-key` | string | developers | This key should exist in the SG where we are going to add the rules. |
| `tag-value` | string | bastionaccess | This value should exist in the tag of the SG where we are going to add the rules. |

### remove

This command will remove the rule added in the SG from the Kubernetes API of the CircleCI machine

| Parameter | Type | Default | Description |
|---|---|---|---|
| `description` | string | CircleCI | Description to identify the rule. |
| `mask` | integer | 32 | Mask to use for the ip address. |
| `port` | integer | 443 | Port to open for the inbound rule. |
| `tag-key` | string | developers | This key should exist in the SG where we are going to add the rules. |
| `tag-value` | string | bastionaccess | This value should exist in the tag of the SG where we are going to add the rules. |

## Examples

### basic_commands

Examples uses aws-white-list-circleci-ip commands

```yaml
jobs:
  build:
    docker:
      - image: circleci/python:2.7
    steps:
      - checkout
      - aws-white-list-circleci-ip/add
      - aws-white-list-circleci-ip/remove
orbs:
  aws-white-list-circleci-ip: avvo/aws-white-list-circleci-ip@0.0.2
version: 2.1
```