From e7718bfbf8d8f342994e08e71baa40166d249438 Mon Sep 17 00:00:00 2001 From: Luis Morales Date: Thu, 27 Jul 2023 12:21:50 +0200 Subject: [PATCH 1/2] Add gitignore and ignored Python venv As the workshop set up a Python virtualenv, it should be ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7275bb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv/ From 19625b5583347978e1330301dc3515db38bc3842 Mon Sep 17 00:00:00 2001 From: Luis Morales Date: Thu, 27 Jul 2023 12:23:04 +0200 Subject: [PATCH 2/2] Fix indentition of CF template This is one of the issues, that lead to aws-samples/aws-proton-workshop-code#8 --- .../cloudformation.yaml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/aws-managed/lb-fargate-service/v1/instance_infrastructure/cloudformation.yaml b/aws-managed/lb-fargate-service/v1/instance_infrastructure/cloudformation.yaml index 0da7a72..35a210d 100644 --- a/aws-managed/lb-fargate-service/v1/instance_infrastructure/cloudformation.yaml +++ b/aws-managed/lb-fargate-service/v1/instance_infrastructure/cloudformation.yaml @@ -151,17 +151,17 @@ Resources: GroupDescription: Access to the public facing load balancer VpcId: '{{environment.outputs.VpcId}}' SecurityGroupIngress: - {% if 'public' == service_instance.inputs.scope %} - # Allow access to ALB from anywhere on the internet - - CidrIp: 0.0.0.0/0 - IpProtocol: -1 - {% else %} - # Allow access only from the VPC CIDR - - CidrIp: '{{environment.outputs.VpcCIDR}}' - IpProtocol: -1 - FromPort: '{{service_instance.inputs.port}}' - ToPort: '{{service_instance.inputs.port}}' - {% endif %} + {% if 'public' == service_instance.inputs.scope %} + # Allow access to ALB from anywhere on the internet + - CidrIp: 0.0.0.0/0 + IpProtocol: -1 + {% else %} + # Allow access only from the VPC CIDR + - CidrIp: '{{environment.outputs.VpcCIDR}}' + IpProtocol: -1 + FromPort: '{{service_instance.inputs.port}}' + ToPort: '{{service_instance.inputs.port}}' + {% endif %} {% if 'public' == service_instance.inputs.scope %} {% set scheme = 'internet-facing' %} @@ -175,8 +175,8 @@ Resources: Properties: Scheme: '{{scheme}}' LoadBalancerAttributes: - - Key: idle_timeout.timeout_seconds - Value: '30' + - Key: idle_timeout.timeout_seconds + Value: '30' Subnets: # The load balancer is placed into the public subnets, so that traffic # from the internet can reach the load balancer directly via the internet gateway