Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
BATIAI-1010: Removing bad SG rules and unneeded Security Group lookup (
Browse files Browse the repository at this point in the history
…#8)

* BATIAI-1010: Removing bad SG rules and unneeded Security Group lookup

* BATIAI-1010: Removing redundant rule; we'll just use the existing 'ingress_cidrs' var

* BATIAI-1010: Updating changelog
  • Loading branch information
bushong1 authored Feb 15, 2023
1 parent 4851a79 commit 8ec4238
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.0.0] - 2022-02-15
### Breaking
- Removing the unneeded var nat_gateway_public_ip_cidrs
- Removing the unneeded data.sg default_USSBA_fargate_security_group

## [3.0.0] - 2022-10-05
### Breaking
- EFS drives are now encrypted, this will recreate any EFS drive created by this module, deleting the data
Expand Down
13 changes: 0 additions & 13 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,6 @@ resource "aws_security_group_rule" "ingress_prefix_list" {
prefix_list_ids = var.ingress_prefix_lists
security_group_id = aws_security_group.alb_sg.id
}
resource "aws_security_group_rule" "ingress_gateway_nat" {
count = length(var.nat_gateway_public_ip_cidrs) > 0 ? 1 : 0
type = "ingress"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = var.nat_gateway_public_ip_cidrs
security_group_id = data.aws_security_group.default_USSBA_fargate_security_group.id
}

data "aws_iam_policy_document" "fargate" {
statement {
Expand Down Expand Up @@ -191,7 +182,3 @@ resource "aws_security_group_rule" "allow_fargate_into_efs" {
security_group_id = aws_security_group.efs.id
source_security_group_id = module.gatus.security_group_id
}

data "aws_security_group" "default_USSBA_fargate_security_group" {
name = "${var.service_name}-alb"
}
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,3 @@ variable "kms_key_id" {
description = "For encrypting the EFS drive; defaults to the aws managed efs key"
type = string
}

variable "nat_gateway_public_ip_cidrs" {
type = list(any)
default = []
description = "For allowing the nat gateway public ips to reach Gatus"
}

0 comments on commit 8ec4238

Please sign in to comment.