Skip to content

Commit

Permalink
AWS security harding, allow disabling internet gateway (#141)
Browse files Browse the repository at this point in the history
* add bastion host source ip restrictions
* rename: dev-box->bastion-host
* allow disabling internet gateway
* misc cleanup
  • Loading branch information
Aaron Steers authored Oct 8, 2020
1 parent aaa7358 commit c290261
Show file tree
Hide file tree
Showing 47 changed files with 292 additions and 511 deletions.
42 changes: 22 additions & 20 deletions catalog/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions catalog/aws/bastion-host/main.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/*
* The `dev-box` catalog module deploys an ECS-backed container which can be used to remotely test
* or develop using the native cloud environment. Applicable use cases include:
* The `bastion-host` module deploys an ECS-backed container which can be used to remotely test
* or develop using the native cloud environment.
*
* * Debugging network firewall and routing rules
* * Debugging components which can only be run from whitelisted IP ranges
* * Offloading heavy processing from the developer's local laptop
* * Mitigating network relability issues when working from WiFi or home networks
* Applicable use cases include:
*
* - Debugging network firewall and routing rules
* - Debugging components which can only be run from whitelisted IP ranges
* - Offloading heavy processing from the developer's local laptop
* - Mitigating network relability issues when working from WiFi or home networks
*
*/

data "aws_availability_zones" "az_list" {}

locals {
name_prefix = "${var.name_prefix}devbox-"
# container_command = ()
Expand Down Expand Up @@ -40,8 +40,9 @@ module "ecs_bastion_task" {
SSH_PUBLIC_KEY_BASE64 = local.ssh_public_key_base64
})
environment_secrets = var.secrets
app_ports = ["22"]
app_ports = []
admin_ports = ["22"]
admin_cidr = var.admin_cidr
}

module "ecr_image" {
Expand Down
5 changes: 5 additions & 0 deletions catalog/aws/bastion-host/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,8 @@ variable "aws_credentials_file" {
description = "Path to the AWS credentials file, used to ensure that the correct credentials are used during upload of the ECR image."
type = string
}
variable "admin_cidr" {
description = "List of source IP CIDR blocks which should be allowed to connect to the bastion host."
type = list(string)
default = null
}
4 changes: 2 additions & 2 deletions catalog/aws/data-lake-users/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions catalog/aws/data-lake/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions catalog/aws/dbt/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions catalog/aws/dbt/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
*
*/

data "aws_availability_zones" "az_list" {}
data "aws_region" "current" {}

locals {
name_prefix = "${var.name_prefix}DBT-"
admin_cidr = var.admin_cidr
Expand Down
166 changes: 0 additions & 166 deletions catalog/aws/dev-box/README.md

This file was deleted.

60 changes: 0 additions & 60 deletions catalog/aws/dev-box/main.tf

This file was deleted.

Loading

0 comments on commit c290261

Please sign in to comment.