github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/d/ip_ranges.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_ip_ranges" 4 sidebar_current: "docs-aws-datasource-ip_ranges" 5 description: |- 6 Get information on AWS IP ranges. 7 --- 8 9 # aws\_ip_ranges 10 11 Use this data source to get the [IP ranges][1] of various AWS products and services. 12 13 ## Example Usage 14 15 ``` 16 data "aws_ip_ranges" "european_ec2" { 17 regions = ["eu-west-1", "eu-central-1"] 18 services = ["ec2"] 19 } 20 21 resource "aws_security_group" "from_europe" { 22 name = "from_europe" 23 24 ingress { 25 from_port = "443" 26 to_port = "443" 27 protocol = "tcp" 28 cidr_blocks = ["${data.aws_ip_ranges.european_ec2.cidr_blocks}"] 29 } 30 31 tags { 32 CreateDate = "${data.aws_ip_ranges.european_ec2.create_date}" 33 SyncToken = "${data.aws_ip_ranges.european_ec2.sync_token}" 34 } 35 } 36 ``` 37 38 ## Argument Reference 39 40 * `regions` - (Optional) Filter IP ranges by regions (or include all regions, if 41 omitted). Valid items are `global` (for `cloudfront`) as well as all AWS regions 42 (e.g. `eu-central-1`) 43 44 * `services` - (Required) Filter IP ranges by services. Valid items are `amazon` 45 (for amazon.com), `cloudfront`, `ec2`, `route53`, `route53_healthchecks` and `S3`. 46 47 ~> **NOTE:** If the specified combination of regions and services does not yield any 48 CIDR blocks, Terraform will fail. 49 50 ## Attributes Reference 51 52 * `cidr_blocks` - The lexically ordered list of CIDR blocks. 53 * `create_date` - The publication time of the IP ranges (e.g. `2016-08-03-23-46-05`). 54 * `sync_token` - The publication time of the IP ranges, in Unix epoch time format 55 (e.g. `1470267965`). 56 57 [1]: http://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html