This repository contains a CloudFormation template designed to create a security group in your AWS environment. This security group allows inbound traffic from all Cloudflare IP ranges on ports 80 and 443, and allows all outbound traffic. The template is specifically set up for the AWS us-west-2
region but can be adapted to other regions by changing the region settings in AWS CloudFormation.
The sole purpose of this repository is to host a CloudFormation template that automates the creation of a security group configured to the IP ranges used by Cloudflare. This can be particularly useful for applications hosted in AWS that utilize Cloudflare as their content delivery network.
To deploy this CloudFormation template using the AWS Management Console, follow these steps:
- Login to your AWS account and navigate to the AWS CloudFormation console.
- Click on 'Create stack' > 'With new resources (standard)'.
- In the 'Specify template' section, select 'Upload a template file'.
- Click on 'Choose file' and upload the
cloudflare_security_group.yaml
file from this repository. - Click 'Next'.
- Enter a stack name, e.g.,
CloudflareSecurityGroupSetup
. - Under 'Parameters', provide the VPC ID where you want the security group to be created.
- Click 'Next', configure any stack options as necessary, and then click 'Next' again.
- Review your settings, acknowledge that AWS CloudFormation might create IAM resources (if applicable), and click 'Create stack'.
- Wait for the stack creation to complete, which will be indicated by the status 'CREATE_COMPLETE'.
You can now navigate to the EC2 console to verify that the security group has been created with the specified configurations.
- An AWS account is necessary to deploy the template.
- Ensure you have the necessary permissions to create resources in AWS CloudFormation and AWS EC2.
Contributions are welcome! If you have improvements or corrections to the template, please feel free to fork the repository and submit a pull request. Ensure your changes are thoroughly tested in an AWS environment before submitting.
This project is licensed under the MIT License - see the LICENSE.md file for details.
For any questions or feedback related to this repository, please contact me on Twitter: @joelicatajr.
You can also open an issue in the repository if you encounter any problems or have suggestions for enhancements.
Copyright © 2024 Joseph Licata. All rights reserved.