Skip to content

Instantly share code, notes, and snippets.

@andywirv
Last active January 25, 2018 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andywirv/41722f6255c9f4388ce1a93ac2f80369 to your computer and use it in GitHub Desktop.
Save andywirv/41722f6255c9f4388ce1a93ac2f80369 to your computer and use it in GitHub Desktop.
Add an AWS Security group for Akamai Siteshield
locals {
"akamai_siteshield_ranges" = [
"11.22.33.41/24",
"11.22.33.42/24",
"11.22.33.45/24"
]
}
resource "aws_security_group" "akamai_siteshield_ranges" {
name = "aws-europe-s1486.akamaiedge.ne"
description = "Allows Akamai edge servers access. Must be kept up to date"
vpc_id = "${aws_vpc.dcos_cluster.id}"
}
resource "aws_security_group_rule" "akamai_cidr" {
count = "${length(local.akamai_siteshield_ranges)}"
type = "ingress"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["${local.akamai_siteshield_ranges[count.index]}"]
security_group_id = "${aws_security_group.akamai_siteshield_ranges.id}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment