Skip to content

Commit 9843fc8

Browse files
marcoieniMark-Simulacrum
authored andcommitted
Improve bastion IP docs
1 parent 4e6a323 commit 9843fc8

File tree

1 file changed

+25
-34
lines changed

1 file changed

+25
-34
lines changed

src/infra/docs/bastion.md

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -50,51 +50,42 @@ access to.
5050
Once that's done [apply the playbook][ansible-apply] and [add a new whitelisted
5151
IP address](#adding-a-whitelisted-ip).
5252

53-
### Adding a whitelisted IP
53+
## Editing a whitelisted IP
5454

5555
Due to privacy reasons, all the static IP addresses of team members with access
5656
to the bastion are stored on [AWS SSM Parameter Store][ssm] instead of public
57-
git repositories. To add an IP address you can run this command (taking care of
58-
replacing `USERNAME` and `IP_ADDRESS` with the proper values):
57+
git repositories.
58+
When running the following commands, replace `USERNAME` and `IP_ADDRESS` with the proper values.
5959

60-
```
61-
aws ssm put-parameter --type String --name "/prod/bastion/allowed-ips/USERNAME" --value "IP_ADDRESS/32"
62-
```
60+
### Adding a whitelisted IP
6361

64-
You'll also need to add the username to the list in
65-
[`terraform/bastion/firewall.tf`][allowed-ips] (local variable
66-
`allowed_users`). Once you made all the needed changes you wanted you need to
67-
[apply the Terraform configuration][terraform-apply].
62+
1. Run:
63+
```
64+
aws ssm put-parameter --type String --name "/prod/bastion/allowed-ips/USERNAME" --value "IP_ADDRESS/32"
65+
```
66+
2. Add the username to the list in
67+
[`terraform/bastion/firewall.tf`][allowed-ips] (local variable
68+
`allowed_users`).
69+
3. [apply the Terraform configuration][terraform-apply].
6870

6971
### Updating a whitelisted IP
7072

71-
Due to privacy reasons, all the static IP addresses of team members with access
72-
to the bastion are stored on [AWS SSM Parameter Store][ssm] instead of public
73-
git repositories. To update an IP address you can run this command (taking care
74-
of replacing `USERNAME` and `IP_ADDRESS` with the proper values):
75-
76-
```
77-
aws ssm put-parameter --overwrite --type String --name "/prod/bastion/allowed-ips/USERNAME" --value "IP_ADDRESS/32"
78-
```
79-
80-
Once you made all the needed changes you wanted you need to [apply the
81-
Terraform configuration][terraform-apply].
73+
1. Run:
74+
```
75+
aws ssm put-parameter --overwrite --type String --name "/prod/bastion/allowed-ips/USERNAME" --value "IP_ADDRESS/32"
76+
```
77+
2. [apply the Terraform configuration][terraform-apply].
8278

8379
### Removing a whitelisted IP
8480

85-
Due to privacy reasons, all the static IP addresses of team members with access
86-
to the bastion are stored on [AWS SSM Parameter Store][ssm] instead of public
87-
git repositories. To remove an IP address you can run this command (taking care
88-
of replacing `USERNAME` with the proper value):
89-
90-
```
91-
aws ssm delete-parameter --name "/prod/bastion/allowed-ips/USERNAME"
92-
```
93-
94-
You'll also need to remove the username from the list in
95-
[`terraform/bastion/firewall.tf`][allowed-ips] (local variable
96-
`allowed_users`). Once you made all the needed changes you wanted you need to
97-
[apply the Terraform configuration][terraform-apply].
81+
1. Run:
82+
```
83+
aws ssm delete-parameter --name "/prod/bastion/allowed-ips/USERNAME"
84+
```
85+
2. Remove the username from the list in
86+
[`terraform/bastion/firewall.tf`][allowed-ips] (local variable
87+
`allowed_users`).
88+
3. [apply the Terraform configuration][terraform-apply].
9889

9990
[ansible]: https://github.com/rust-lang/simpleinfra/blob/master/ansible/playbooks/bastion.yml
10091
[terraform]: https://github.com/rust-lang/simpleinfra/tree/master/terraform/bastion

0 commit comments

Comments
 (0)