Skip to content

Commit d9c2fbc

Browse files
committed
Allow whitelisting IPs for webserver, flower, etc from service.yml
1 parent 458526f commit d9c2fbc

6 files changed

+12
-65
lines changed

cloudformation/83_airflow-flower.yml.j2

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ Resources:
77
GroupDescription: Security group for Airflow Flower. Allow all inbound traffic.
88
GroupName: "{{ serviceName }}-{{ ENVIRONMENT }}-flower-external-security-group"
99
SecurityGroupEgress:
10-
- CidrIp: 0.0.0.0/0
11-
FromPort: 0
12-
IpProtocol: -1
13-
ToPort: 0
10+
{{ securityGroupEgressRules }}
1411
SecurityGroupIngress:
1512
- CidrIp: 0.0.0.0/0
1613
FromPort: "{{ service.port }}"

cloudformation/84_airflow-scheduler.yml.j2

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ Resources:
77
GroupDescription: Security group for Airflow Scheduler
88
GroupName: "{{ serviceName }}-{{ ENVIRONMENT }}-scheduler-security-group"
99
SecurityGroupEgress:
10-
- CidrIp: 0.0.0.0/0
11-
FromPort: 0
12-
IpProtocol: -1
13-
ToPort: 0
10+
{{ securityGroupEgressRules }}
1411
VpcId: !ImportValue network-VpcId
1512
Tags:
1613
- Key: Name

cloudformation/85_airflow-webserver.yml.j2

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ Resources:
77
GroupDescription: Security group for Airflow webserver. Allow all inbound traffic.
88
GroupName: "{{ serviceName }}-{{ ENVIRONMENT }}-webserver-security-group"
99
SecurityGroupEgress:
10-
- CidrIp: 0.0.0.0/0
11-
FromPort: 0
12-
IpProtocol: -1
13-
ToPort: 0
10+
{{ securityGroupEgressRules }}
1411
SecurityGroupIngress:
1512
- CidrIp: 0.0.0.0/0
1613
FromPort: "{{ service.port }}"

cloudformation/86_airflow-workers.yml.j2

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ Resources:
77
GroupDescription: Security group for Airflow workers
88
GroupName: "{{ serviceName }}-{{ ENVIRONMENT }}-workers-security-group"
99
SecurityGroupEgress:
10-
- CidrIp: 0.0.0.0/0
11-
FromPort: 0
12-
IpProtocol: -1
13-
ToPort: 0
10+
{{ securityGroupEgressRules }}
1411
SecurityGroupIngress:
1512
- CidrIp: "{{ service.cidrBlock }}/16"
1613
FromPort: "{{ service.workers.port }}"

dags/crypto_extract_dag.py

-49
This file was deleted.

service.yml

+8
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ publicSubnet:
8181
cidrBlock: 10.0.3.0/24
8282
availabilityZone: c
8383

84+
# List of SecurityGroupEgress.
85+
# Will be used to whitelist IPs for webserver, flower, workers and scheduler
86+
securityGroupEgressRules:
87+
- CidrIp: 0.0.0.0/0
88+
FromPort: 0
89+
IpProtocol: -1
90+
ToPort: 0
91+
8492
metadataDb:
8593
instanceType: db.t3.micro
8694
port: 5432

0 commit comments

Comments
 (0)