github.com/ves/terraform@v0.8.0-beta2/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 23 name = "from_europe" 24 25 ingress { 26 from_port = "443" 27 to_port = "443" 28 protocol = "tcp" 29 cidr_blocks = [ "${data.aws_ip_ranges.european_ec2.cidr_blocks}" ] 30 } 31 32 tags { 33 CreateDate = "${data.aws_ip_ranges.european_ec2.create_date}" 34 SyncToken = "${data.aws_ip_ranges.european_ec2.sync_token}" 35 } 36 37 } 38 ``` 39 40 ## Argument Reference 41 42 * `regions` - (Optional) Filter IP ranges by regions (or include all regions, if 43 omitted). Valid items are `global` (for `cloudfront`) as well as all AWS regions 44 (e.g. `eu-central-1`) 45 46 * `services` - (Required) Filter IP ranges by services. Valid items are `amazon` 47 (for amazon.com), `cloudfront`, `ec2`, `route53` and `route53_healthchecks`. 48 49 ~> **NOTE:** If the specified combination of regions and services does not yield any 50 CIDR blocks, Terraform will fail. 51 52 ## Attributes Reference 53 54 * `cidr_blocks` - The lexically ordered list of CIDR blocks. 55 * `create_date` - The publication time of the IP ranges (e.g. `2016-08-03-23-46-05`). 56 * `sync_token` - The publication time of the IP ranges, in Unix epoch time format 57 (e.g. `1470267965`). 58 59 [1]: http://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html