Giter Site home page Giter Site logo

asmtal / terraform-aws-cloudflare-security-group Goto Github PK

View Code? Open in Web Editor NEW

This project forked from orzarchi/terraform-aws-cloudflare-security-group

0.0 0.0 0.0 12 KB

A Terraform module that populates a security group with cloudflare ip ranges and keeps it updated daily.

License: MIT License

Python 47.97% HCL 52.03%

terraform-aws-cloudflare-security-group's Introduction

AWS CloudFlare security group Terraform module

Terraform module that populates a security group with cloudflare ip ranges and keeps it updated daily.

The following resources are created:

  • A lambda function that keeps your security group's ingress rules updated with published cloudflare ip ranges.
  • A cloudwatch event rule with a schedule to trigger the lambda daily

Usage

module "cloudflare-ips" {
  source = "github.com/orzarchi/terraform-aws-cloudflare-security-group"

  security_group_id = "${aws_security_group.cloudflare.id}"
  enabled= "${var.use_cloudflare}"
}

Requirements

No requirements.

Providers

Name Version
archive n/a
aws n/a

Modules

No modules.

Resources

Name Type
aws_cloudwatch_event_rule.cloudflare-update-schedule resource
aws_cloudwatch_event_target.cloudflare-update-schedule resource
aws_cloudwatch_log_group.lambda-log-group resource
aws_iam_policy.policy resource
aws_iam_role.iam_for_lambda resource
aws_iam_role_policy_attachment.policy resource
aws_lambda_function.update-ips resource
aws_lambda_permission.allow_cloudwatch resource
aws_security_group_rule.egress_http resource
aws_security_group_rule.egress_https resource
archive_file.lambda_zip data source

Inputs

Name Description Type Default Required
enabled Whether to do anything at all, useful if cloudflare is not needed on all environments. Accepts the string 'true' or 'false'. string "true" no
schedule_expression The cloudwatch schedule expression used to run the updater lambda. string "cron(0 20 * * ? *)" no
security_group_id An existing security group to populate with cloudflare ips as ingress rules. any n/a yes

Outputs

No outputs.

Variables

  • security_group_id: An existing security group to populate with cloudflare ips as ingress rules.
  • schedule_expression: The cloudwatch schedule expression used to run the updater lambda. Defaults to every day at 20:00.
  • enabled (Optional) - whether to do anything at all, useful if cloudflare is not needed on all environments. Accepts the string "true" or "false". Defaults to "true"

terraform-aws-cloudflare-security-group's People

Contributors

orzarchi avatar phivid avatar robertomoutinho avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.