Skip to content

Commit 9b6b6c6

Browse files
author
Christopher M. Neill
committed
so security. much rule.
1 parent 3695775 commit 9b6b6c6

1 file changed

Lines changed: 96 additions & 1 deletion

File tree

  • ansible/roles/ec2/sg_configure/tasks

ansible/roles/ec2/sg_configure/tasks/main.yml

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@
408408
from_port: -1
409409
to_port: -1
410410
group_id: "{{ sg_rds }}"
411+
- proto: tcp
411412

412413
- name: Redis SG
413414
tags:
@@ -424,7 +425,6 @@
424425
from_port: 22
425426
to_port: 22
426427
group_id: "{{ sg_bastion }}"
427-
- proto: tcp
428428
from_port: 6379
429429
to_port: 6379
430430
group_id: "{{ sg_api }}"
@@ -454,3 +454,98 @@
454454
to_port: -1
455455
group_id: "{{ sg_redis }}"
456456

457+
- name: Services SG
458+
tags:
459+
- services
460+
ec2_group:
461+
name: "{{ env }}-services"
462+
description: "{{ env }} Services Security Policy"
463+
vpc_id: "{{ vpc_id }}"
464+
region: us-west-2
465+
aws_secret_key: "{{ aws_secret_key }}"
466+
aws_access_key: "{{ aws_access_key }}"
467+
rules:
468+
- proto: tcp
469+
from_port: 22
470+
to_port: 22
471+
group_id: "{{ sg_bastion }}"
472+
- proto: udp
473+
from_port: 53
474+
to_port: 53
475+
group_id: "{{ sg_dock }}"
476+
- proto: tcp
477+
from_port: 53
478+
to_port: 53
479+
group_id: "{{ sg_dock }}"
480+
- proto: tcp
481+
from_port: 80
482+
to_port: 80
483+
group_id: "{{ sg_api }}"
484+
- proto: tcp
485+
from_port: 80
486+
to_port: 80
487+
group_id: "{{ sg_dock }}"
488+
- proto: tcp
489+
from_port: 80
490+
to_port: 80
491+
group_id: "{{ sg_hipache }}"
492+
- proto: tcp
493+
from_port: 443
494+
to_port: 443
495+
group_id: "{{ sg_api }}"
496+
- proto: tcp
497+
from_port: 443
498+
to_port: 443
499+
group_id: "{{ sg_dock }}"
500+
- proto: tcp
501+
from_port: 443
502+
to_port: 443
503+
group_id: "{{ sg_hipache }}"
504+
- proto: tcp
505+
from_port: 2375
506+
to_port: 2375
507+
group_id: "{{ sg_api }}"
508+
- proto: tcp
509+
from_port: 3567
510+
to_port: 3567
511+
group_id: "{{ sg_hipache }}"
512+
- proto: tcp
513+
from_port: 8200
514+
to_port: 8200
515+
group_id: "{{ sg_dock }}"
516+
- proto: udp
517+
from_port: 8300
518+
to_port: 8302
519+
group_id: "{{ sg_api }}"
520+
- proto: udp
521+
from_port: 8300
522+
to_port: 8302
523+
group_id: "{{ sg_web }}"
524+
- proto: tcp
525+
from_port: 8300
526+
to_port: 8302
527+
group_id: "{{ sg_api }}"
528+
- proto: tcp
529+
from_port: 8300
530+
to_port: 8302
531+
group_id: "{{ sg_web }}"
532+
- proto: tcp
533+
from_port: 8400
534+
to_port: 8400
535+
group_id: "{{ sg_api }}"
536+
- proto: tcp
537+
from_port: 8400
538+
to_port: 8400
539+
group_id: "{{ sg_web }}"
540+
- proto: tcp
541+
from_port: 8500
542+
to_port: 8500
543+
group_id: "{{ sg_api }}"
544+
- proto: tcp
545+
from_port: 8500
546+
to_port: 8500
547+
group_id: "{{ sg_dock }}"
548+
- proto: tcp
549+
from_port: 8500
550+
to_port: 8500
551+
group_id: "{{ sg_web }}"

0 commit comments

Comments
 (0)