@@ -48,26 +48,54 @@ users. Please leave a comment clarifying which servers the user will have
48
48
access to.
49
49
50
50
Once that's done [ apply the playbook] [ ansible-apply ] and [ add a new whitelisted
51
- IP address] ( #updating-the -whitelisted-ips ) .
51
+ IP address] ( #adding-a -whitelisted-ip ) .
52
52
53
- ### Updating the whitelisted IPs
53
+ ### Adding a whitelisted IP
54
54
55
55
Due to privacy reasons, all the static IP addresses of team members with access
56
56
to the bastion are stored on [ AWS SSM Parameter Store] [ ssm ] instead of public
57
- git repositories. To add or update an IP address you can run this command
58
- (taking care of replacing ` USERNAME ` and ` IP_ADDRESS ` with the proper values):
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):
59
59
60
60
```
61
61
aws ssm put-parameter --type String --name "/prod/bastion/allowed-ips/USERNAME" --value "IP_ADDRESS/32"
62
62
```
63
63
64
- If you're adding an IP address instead of updating it, you'll also need to add
65
- the username to the list in [ ` terraform/services.tf ` ] [ allowed-ips ] (key
66
- ` allowed_users ` in the ` service_bastion ` module).
64
+ You'll also need to add the username to the list in
65
+ [ ` terraform/services.tf ` ] [ allowed-ips ] (key ` allowed_users ` in the
66
+ ` service_bastion ` module). Once you made all the needed changes you wanted you
67
+ need to [ apply the Terraform configuration] [ terraform-apply ] .
68
+
69
+ ### Updating a whitelisted IP
70
+
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
+ ```
67
79
68
80
Once you made all the needed changes you wanted you need to [ apply the
69
81
Terraform configuration] [ terraform-apply ] .
70
82
83
+ ### Removing a whitelisted IP
84
+
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/services.tf ` ] [ allowed-ips ] (key ` allowed_users ` in the
96
+ ` service_bastion ` module). Once you made all the needed changes you wanted you
97
+ need to [ apply the Terraform configuration] [ terraform-apply ] .
98
+
71
99
[ ansible ] : https://github.com/rust-lang/simpleinfra/blob/master/ansible/playbooks/bastion.yml
72
100
[ terraform ] : https://github.com/rust-lang/simpleinfra/tree/master/terraform/services/bastion
73
101
[ grafana ] : https://grafana.rust-lang.org/d/rpXrFfKWz/instance-metrics?orgId=1&var-instance=bastion.infra.rust-lang.org:9100
0 commit comments