Adds new EKS IP addresses

This commit is contained in:
Nemo 2020-07-12 02:26:35 +05:30
parent 75765e925a
commit 36e24007c9
2 changed files with 191 additions and 52 deletions

View File

@ -1,32 +1,27 @@
locals { locals {
// South Carolina # South Carolina
gcp-us-east1 = [ gcp-us-east1 = [
"35.196.243.26", "35.196.243.26",
"35.196.36.95", "35.196.36.95",
"35.196.227.117"
] ]
// Northern Virginia # Northern Virginia
gcp-us-east4 = [ gcp-us-east4 = [
"35.186.176.0", "35.186.176.0",
"35.245.211.109", "35.245.211.109",
"35.245.121.2", "35.245.121.2",
"35.236.208.158"
] ]
# Oregon # Oregon
gcp-us-west1 = [ gcp-us-west1 = [
"35.185.199.172",
"34.82.227.133", "34.82.227.133",
"35.233.172.23", "35.233.172.23",
"34.83.141.137", "34.83.141.137",
"34.83.151.46", "34.83.151.46",
"35.185.199.172",
]
# Canada / Montreal
gcp-northamerica-northeast1 = [
"35.203.16.100",
"35.203.92.116",
] ]
# London # London
@ -35,7 +30,6 @@ locals {
"34.89.40.253" "34.89.40.253"
] ]
# Frankfurt # Frankfurt
gcp-europe-west3 = [ gcp-europe-west3 = [
"34.89.161.120", "34.89.161.120",
@ -43,16 +37,21 @@ locals {
] ]
# Singapore # Singapore
gcp-asia-southeast1 = [ gcp-asia-southeast1 = [
"35.185.184.54" "35.185.184.54"
] ]
# Canada / Montreal
gcp-northamerica-northeast1 = [
"35.203.16.100",
"35.203.92.116",
]
# Sydney
gcp-australia-southeast1 = [ gcp-australia-southeast1 = [
"35.189.54.47" "35.189.54.47"
] ]
us = [ us = [
"54.208.10.167", "54.208.10.167",
"54.209.116.191", "54.209.116.191",
@ -91,4 +90,50 @@ locals {
"52.67.8.103", "52.67.8.103",
"54.233.74.59", "54.233.74.59",
] ]
/**
Use these IP addresses for all instances hosted on Amazon EKS
that were created on or after 07/07/2020.
*/
eks-us-east-1 = [
"18.210.137.130",
"54.204.171.253",
"50.17.192.87",
]
eks-ca-central-1 = [
"52.60.157.61",
"35.182.169.25",
"52.60.59.128",
]
eks-eu-west-1 = [
"52.210.85.110",
"52.30.198.163",
"34.249.159.112",
]
eks-eu-central-1 = [
"18.157.231.108",
"18.157.207.33",
"18.157.64.198",
]
eks-ap-northeast-1 = [
"54.250.91.57",
"13.112.30.110",
"54.92.76.241",
]
eks-ap-southeast-2 = [
"13.238.132.174",
"3.105.238.71",
"3.105.113.36",
]
eks-sa-east-1 = [
"54.232.58.181",
"54.232.58.98",
"177.71.134.208",
]
} }

View File

@ -1,40 +1,40 @@
output "us" { output "us" {
description = "Looker IP Addresses in United States (AWS only)" description = "Legacy Hosting IP Addresses in United States for instances hosted on AWS that were created before 07/07/2020"
value = "${local.us}" value = "${local.us}"
} }
output "ca" { output "ca" {
description = "Looker IP Addresses in Canada (AWS only)" description = "Legacy Hosting IP Addresses in Canada for instances hosted on AWS that were created before 07/07/2020"
value = "${local.ca}" value = "${local.ca}"
} }
output "as" { output "as" {
description = "Looker IP Addresses in Asia (AWS only)" description = "Legacy Hosting IP Addresses in Asia for instances hosted on AWS that were created before 07/07/2020"
value = "${local.as}" value = "${local.as}"
} }
output "ie" { output "ie" {
description = "Looker IP Addresses in Ireland (AWS only)" description = "Legacy Hosting IP Addresses in Ireland for instances hosted on AWS that were created before 07/07/2020"
value = "${local.ie}" value = "${local.ie}"
} }
output "de" { output "de" {
description = "Looker IP Addresses in Germany (AWS only)" description = "Legacy Hosting IP Addresses in Germany for instances hosted on AWS that were created before 07/07/2020"
value = "${local.de}" value = "${local.de}"
} }
output "au" { output "au" {
description = "Looker IP Addresses in Australia (AWS only)" description = "Legacy Hosting IP Addresses in Australia for instances hosted on AWS that were created before 07/07/2020"
value = "${local.au}" value = "${local.au}"
} }
output "sa" { output "sa" {
description = "Looker IP Addresses in South America (AWS only)" description = "Legacy Hosting IP Addresses in South America for instances hosted on AWS that were created before 07/07/2020"
value = "${local.sa}" value = "${local.sa}"
} }
output "aws_ips" { output "aws_ips" {
description = "Looker IP addresses everywhere (AWS only)" description = "Legacy Hosting IP addresses for instances hosted anywhere that were created before 07/07/2020"
value = "${concat( value = "${concat(
local.gcp-us-east1, local.gcp-us-east1,
@ -46,42 +46,42 @@ output "aws_ips" {
} }
output "us_cidr" { output "us_cidr" {
description = "Looker IP Addresses in United States in CIDR (AWS only)" description = "Legacy Hosting CIDR in United States for instances hosted on AWS that were created before 07/07/2020"
value = ["${formatlist("%s/32", local.us)}"] value = ["${formatlist("%s/32", local.us)}"]
} }
output "ca_cidr" { output "ca_cidr" {
description = "Looker IP Addresses in Canada in CIDR (AWS only)" description = "Legacy Hosting CIDR in Canada for instances hosted on AWS that were created before 07/07/2020"
value = ["${formatlist("%s/32", local.ca)}"] value = ["${formatlist("%s/32", local.ca)}"]
} }
output "as_cidr" { output "as_cidr" {
description = "Looker IP Addresses in Asia in CIDR (AWS only)" description = "Legacy Hosting CIDR in Asia for instances hosted on AWS that were created before 07/07/2020"
value = ["${formatlist("%s/32", local.as)}"] value = ["${formatlist("%s/32", local.as)}"]
} }
output "ie_cidr" { output "ie_cidr" {
description = "Looker IP Addresses in Ireland in CIDR (AWS only)" description = "Legacy Hosting CIDR in Ireland for instances hosted on AWS that were created before 07/07/2020"
value = ["${formatlist("%s/32", local.ie)}"] value = ["${formatlist("%s/32", local.ie)}"]
} }
output "de_cidr" { output "de_cidr" {
description = "Looker IP Addresses in Germany in CIDR (AWS only)" description = "Legacy Hosting CIDR in Germany for instances hosted on AWS that were created before 07/07/2020"
value = ["${formatlist("%s/32", local.de)}"] value = ["${formatlist("%s/32", local.de)}"]
} }
output "au_cidr" { output "au_cidr" {
description = "Looker IP Addresses in Australia in CIDR (AWS only)" description = "Legacy Hosting CIDR in Australia for instances hosted on AWS that were created before 07/07/2020"
value = ["${formatlist("%s/32", local.au)}"] value = ["${formatlist("%s/32", local.au)}"]
} }
output "sa_cidr" { output "sa_cidr" {
description = "Looker IP Addresses in South America in CIDR (AWS only)" description = "Legacy Hosting CIDR in South America for instances hosted on AWS that were created before 07/07/2020"
value = ["${formatlist("%s/32", local.sa)}"] value = ["${formatlist("%s/32", local.sa)}"]
} }
output "aws_cidr" { output "aws_cidr" {
description = "Looker IP addresses for all AWS regions (CIDR format)" description = "Legacy Hosting CIDR for all for instances hosted on AWS that were created before 07/07/2020"
value = "${formatlist("%s/32", concat( value = "${formatlist("%s/32", concat(
local.us, local.us,
@ -100,49 +100,49 @@ output "aws_cidr" {
// South Carolina // South Carolina
output "gcp_us_east1_ips" { output "gcp_us_east1_ips" {
description = "Looker IPs for instances hosted in GCP (South Carolina / us-east1)" description = "IP addresses for instances hosted on GCP (South Carolina / us-east1)"
value = "${local.gcp-us-east1}" value = "${local.gcp-us-east1}"
} }
// Northern Virginia // Northern Virginia
output "gcp_us_east4_ips" { output "gcp_us_east4_ips" {
description = "Looker IPs for instances hosted in GCP (Northern Virginia / us-east4)" description = "IP addresses for instances hosted on GCP (Northern Virginia / us-east4)"
value = "${local.gcp-us-east4}" value = "${local.gcp-us-east4}"
} }
// Oregon // Oregon
output "gcp_us_west1_ips" { output "gcp_us_west1_ips" {
description = "Looker IPs for instances hosted in GCP (Oregon / us-west1)" description = "IP addresses for instances hosted on GCP (Oregon / us-west1)"
value = "${local.gcp-us-west1}" value = "${local.gcp-us-west1}"
} }
// Canada/Montreal // Canada/Montreal
output "gcp_northamerica_northeast1_ips" { output "gcp_northamerica_northeast1_ips" {
description = "Looker IPs for instances hosted in GCP (Canada / Montreal / gcp-northamerica-northeast1)" description = "IP addresses for instances hosted on GCP (Canada / Montreal / gcp-northamerica-northeast1)"
value = "${local.gcp-northamerica-northeast1}" value = "${local.gcp-northamerica-northeast1}"
} }
// London // London
output "gcp_europe_west2_ips" { output "gcp_europe_west2_ips" {
description = "Looker IPs for instances hosted in GCP (London / europe-west2)" description = "IP addresses for instances hosted on GCP (London / europe-west2)"
value = "${local.gcp-europe-west2}" value = "${local.gcp-europe-west2}"
} }
// Frankfurt // Frankfurt
output "gcp_europe_west3_ips" { output "gcp_europe_west3_ips" {
description = "Looker IPs for instances hosted in GCP (Frankfurt / europe-west3)" description = "IP addresses for instances hosted on GCP (Frankfurt / europe-west3)"
value = "${local.gcp-europe-west3}" value = "${local.gcp-europe-west3}"
} }
// Singapore // Singapore
output "gcp_asia_southeast1_ips" { output "gcp_asia_southeast1_ips" {
description = "Looker IPs for instances hosted in GCP (Singapore / asia-southeast1)" description = "IP addresses for instances hosted on GCP (Singapore / asia-southeast1)"
value = "${local.gcp-asia-southeast1}" value = "${local.gcp-asia-southeast1}"
} }
// Sydney // Sydney
output "gcp_australia_southeast1_ips" { output "gcp_australia_southeast1_ips" {
description = "Looker IPs for instances hosted in GCP (Sydney / australia-southeast1)" description = "IP addresses for instances hosted on GCP (Sydney / australia-southeast1)"
value = "${local.gcp-australia-southeast1}" value = "${local.gcp-australia-southeast1}"
} }
@ -151,57 +151,57 @@ output "gcp_australia_southeast1_ips" {
// South Carolina // South Carolina
output "gcp_us_east1_cidr" { output "gcp_us_east1_cidr" {
description = "Looker CIDRs for instances hosted in GCP (South Carolina / us-east1)" description = "CIDRs for instances hosted on GCP (South Carolina / us-east1)"
value = ["${formatlist("%s/32", local.gcp-us-east1)}"] value = ["${formatlist("%s/32", local.gcp-us-east1)}"]
} }
// Northern Virginia // Northern Virginia
output "gcp_us_east4_cidr" { output "gcp_us_east4_cidr" {
description = "Looker CIDRs for instances hosted in GCP (Northern Virginia / us-east4)" description = "CIDRs for instances hosted on GCP (Northern Virginia / us-east4)"
value = ["${formatlist("%s/32", local.gcp-us-east4)}"] value = ["${formatlist("%s/32", local.gcp-us-east4)}"]
} }
// Oregon // Oregon
output "gcp_us_west1_cidr" { output "gcp_us_west1_cidr" {
description = "Looker CIDRs for instances hosted in GCP (Oregon / us-west1)" description = "CIDRs for instances hosted on GCP (Oregon / us-west1)"
value = ["${formatlist("%s/32", local.gcp-us-west1)}"] value = ["${formatlist("%s/32", local.gcp-us-west1)}"]
} }
// Canada / Montreal // Canada / Montreal
output "gcp_northamerica_northeast1_cidr" { output "gcp_northamerica_northeast1_cidr" {
description = "Looker CIDRs for instances hosted in GCP (Canada / Montreal / gcp-northamerica-northeast1)" description = "CIDRs for instances hosted on GCP (Canada / Montreal / gcp-northamerica-northeast1)"
value = ["${formatlist("%s/32", local.gcp-northamerica-northeast1)}"] value = ["${formatlist("%s/32", local.gcp-northamerica-northeast1)}"]
} }
// London // London
output "gcp_europe_west2_cidr" { output "gcp_europe_west2_cidr" {
description = "Looker CIDRs for instances hosted in GCP (London / europe-west2)" description = "CIDRs for instances hosted on GCP (London / europe-west2)"
value = ["${formatlist("%s/32", local.gcp-europe-west2)}"] value = ["${formatlist("%s/32", local.gcp-europe-west2)}"]
} }
// Frankfurt // Frankfurt
output "gcp_europe_west3_cidr" { output "gcp_europe_west3_cidr" {
description = "Looker CIDRs for instances hosted in GCP (Frankfurt / europe-west3)" description = "CIDRs for instances hosted on GCP (Frankfurt / europe-west3)"
value = ["${formatlist("%s/32", local.gcp-europe-west3)}"] value = ["${formatlist("%s/32", local.gcp-europe-west3)}"]
} }
// Singapore // Singapore
output "gcp_asia_southeast1_cidr" { output "gcp_asia_southeast1_cidr" {
description = "Looker CIDRs for instances hosted in GCP (South Carolina / us-east1)" description = "CIDRs for instances hosted on GCP (South Carolina / us-east1)"
value = ["${formatlist("%s/32", local.gcp-us-east1)}"] value = ["${formatlist("%s/32", local.gcp-us-east1)}"]
} }
// Singapore // Singapore
output "gcp_australia_southeast1_cidr" { output "gcp_australia_southeast1_cidr" {
description = "Looker CIDRs for instances hosted in GCP (Sydney / australia-southeast1)" description = "CIDRs for instances hosted on GCP (Sydney / australia-southeast1)"
value = ["${formatlist("%s/32", local.gcp-australia-southeast1)}"] value = ["${formatlist("%s/32", local.gcp-australia-southeast1)}"]
} }
##### GCP Common #### ##### GCP Common ####
output "gcp_cidr" { output "gcp_cidr" {
description = "Looker IP addresses everywhere in CIDR (GCP only)" description = "IP addresses for instances hosted on GCP in any region."
value = "${formatlist("%s/32", concat( value = "${formatlist("%s/32", concat(
local.gcp-us-east1, local.gcp-us-east1,
@ -215,9 +215,8 @@ output "gcp_cidr" {
))}" ))}"
} }
output "gcp_ips" { output "gcp_ips" {
description = "Looker IP addresses everywhere (GCP only)" description = "Looker IP addresses everywhere (GCP only)."
value = "${concat( value = "${concat(
local.gcp-us-east1, local.gcp-us-east1,
@ -231,10 +230,92 @@ output "gcp_ips" {
)}" )}"
} }
##### Combined AWS+GCP ##### ##### EKS Section Begins ####
output "eks_ca_central_1" {
description = "IP addresses for instances hosted on Amazon EKS in ca-central-1 region."
value = "${local.eks-ca-central-1}"
}
output "eks_eu_west_1" {
description = "IP addresses for instances hosted on Amazon EKS in eu-west-1 region."
value = "${local.eks-eu-west-1}"
}
output "eks_eu_central_1" {
description = "IP addresses for instances hosted on Amazon EKS in eu-central-1 region."
value = "${local.eks-eu-central-1}"
}
output "eks_ap_northeast_1" {
description = "IP addresses for instances hosted on Amazon EKS in ap-northeast-1 region."
value = "${local.eks-ap-northeast-1}"
}
output "eks_ap_southeast_2" {
description = "IP addresses for instances hosted on Amazon EKS in ap-southeast-2 region."
value = "${local.eks-ap-southeast-2}"
}
output "eks_sa_east_1" {
description = "IP addresses for instances hosted on Amazon EKS in sa-east-1 region."
value = "${local.eks-sa-east-1}"
}
output "eks_ca_central_1_cidr" {
description = "CIDRs for instances hosted on Amazon EKS in eks-ca-central-1 region"
value = ["${formatlist("%s/32", local.eks-ca-central-1)}"]
}
output "eks_eu_west_1_cidr" {
description = "CIDRs for instances hosted on Amazon EKS in eks-eu-west-1 region"
value = ["${formatlist("%s/32", local.eks-eu-west-1)}"]
}
output "eks_eu_central_1_cidr" {
description = "CIDRs for instances hosted on Amazon EKS in eks-eu-central-1 region"
value = ["${formatlist("%s/32", local.eks-eu-central-1)}"]
}
output "eks_ap_northeast_1_cidr" {
description = "CIDRs for instances hosted on Amazon EKS in eks-ap-northeast-1 region"
value = ["${formatlist("%s/32", local.eks-ap-northeast-1)}"]
}
output "eks_ap_southeast_2_cidr" {
description = "CIDRs for instances hosted on Amazon EKS in eks-ap-southeast-2 region"
value = ["${formatlist("%s/32", local.eks-ap-southeast-2)}"]
}
output "eks_sa_east_1_cidr" {
description = "CIDRs for instances hosted on Amazon EKS in eks-sa-east-1 region"
value = ["${formatlist("%s/32", local.eks-sa-east-1)}"]
}
output "eks_ips" {
description = "IP addresses for instances hosted on Amazon EKS across all regions"
value = "${concat(
local.eks-us-east-1,
local.eks-ca-central-1,
local.eks-eu-west-1,
local.eks-eu-central-1,
local.eks-ap-northeast-1,
local.eks-ap-southeast-2,
local.eks-sa-east-1,
)}"
}
output "eks_cidr" {
description = "CIDRs for instances hosted on Amazon EKS across all regions"
value = "${formatlist("%s/32", concat(
local.eks-us-east-1,
local.eks-ca-central-1,
local.eks-eu-west-1,
local.eks-eu-central-1,
local.eks-ap-northeast-1,
local.eks-ap-southeast-2,
local.eks-sa-east-1,
))}"
}
##### Combined AWS+GCP+EKS #####
output "all_cidr" { output "all_cidr" {
description = "Looker IP addresses everywhere in CIDR" description = "Looker IP addresses everywhere in CIDR (Legacy + GCP + EKS)"
value = "${formatlist("%s/32", concat( value = "${formatlist("%s/32", concat(
local.gcp-us-east1, local.gcp-us-east1,
@ -252,12 +333,18 @@ output "all_cidr" {
local.de, local.de,
local.au, local.au,
local.sa, local.sa,
local.eks-us-east-1,
local.eks-ca-central-1,
local.eks-eu-west-1,
local.eks-eu-central-1,
local.eks-ap-northeast-1,
local.eks-ap-southeast-2,
local.eks-sa-east-1,
))}" ))}"
} }
output "all_ips" { output "all_ips" {
description = "Looker IP addresses everywhere (both AWS and GCP)" description = "Looker IP addresses everywhere (Legacy AWS + GCP + EKS)"
value = "${concat( value = "${concat(
local.gcp-us-east1, local.gcp-us-east1,
@ -275,5 +362,12 @@ output "all_ips" {
local.de, local.de,
local.au, local.au,
local.sa, local.sa,
local.eks-us-east-1,
local.eks-ca-central-1,
local.eks-eu-west-1,
local.eks-eu-central-1,
local.eks-ap-northeast-1,
local.eks-ap-southeast-2,
local.eks-sa-east-1,
)}" )}"
} }