diff --git a/.github/workflows/pulumi-cloud-resource-create.yml b/.github/workflows/pulumi-cloud-resource-create.yml index d0422ed7..58a79755 100644 --- a/.github/workflows/pulumi-cloud-resource-create.yml +++ b/.github/workflows/pulumi-cloud-resource-create.yml @@ -10,8 +10,6 @@ on: paths: - '.github/workflows/pulumi-cloud-resource-create.yml' workflow_dispatch: - branches: - - main env: SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }} diff --git a/infrastructure/aws/__init__.py b/infrastructure/aws/__init__.py index cebbd5ff..de0fa7ff 100644 --- a/infrastructure/aws/__init__.py +++ b/infrastructure/aws/__init__.py @@ -92,7 +92,7 @@ def route_table( vpc_id, igw_id ): #------------------------------------# def security_group( vpc_id ): security_group = pulumi_aws.ec2.SecurityGroup( - resource_name = f'ec2-sg-{project_name}-{stack_name}', + resource_name = f'ec2-default-sg-{project_name}-{stack_name}', vpc_id = vpc_id, description = "Allow all HTTP(s) traffic to EKS Cluster", ingress = [ @@ -102,19 +102,26 @@ def security_group( vpc_id ): to_port=22, cidr_blocks=['0.0.0.0/0'], description='Allow sshd connect'), - pulumi_aws.ec2.SecurityGroupIngressArgs( - protocol='tcp', - from_port=443, - to_port=443, - cidr_blocks=['0.0.0.0/0'], - description='Allow https 443'), pulumi_aws.ec2.SecurityGroupIngressArgs( protocol='tcp', from_port=80, to_port=80, cidr_blocks=['0.0.0.0/0'], description='Allow http 80') + pulumi_aws.ec2.SecurityGroupIngressArgs( + protocol='tcp', + from_port=443, + to_port=443, + cidr_blocks=['0.0.0.0/0'], + description='Allow https 443'), ], + egress=[ + pulumi_aws.ec2.SecurityGroupEgressArgs( + from_port=0, + to_port=0, + protocol="-1", + cidr_blocks=["0.0.0.0/0"], + )], tags = { "Project": project_name, "Stack": stack_name