Added documentation.

This commit is contained in:
Joern Barthel 2016-08-05 17:12:46 +02:00
parent 9f565285d1
commit 67bf13fccf
4 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,59 @@
---
layout: "aws"
page_title: "AWS: aws_ip_ranges"
sidebar_current: "docs-aws-datasource-ip_ranges"
description: |-
Get information on AWS IP ranges.
---
# aws\_ip_ranges
Use this data source to get the [IP ranges][1] of various AWS products and services.
## Example Usage
```
data "aws_ip_ranges" "european_ec2" {
regions = [ "eu-west-1", "eu-central-1" ]
services = [ "ec2" ]
}
resource "aws_security_group" "from_europe" {
name = "from_europe"
ingress {
from_port = "443"
to_port = "443"
protocol = "tcp"
cidr_blocks = [ "${data.aws_ip_ranges.european_ec2.blocks}" ]
}
tags {
CreateDate = "${data.aws_ip_ranges.european_ec2.create_date}"
SyncToken = "${data.aws_ip_ranges.european_ec2.sync_token}"
}
}
```
## Argument Reference
* `regions` - (Optional) Filter IP ranges by regions (or include all regions, if
omitted). Valid items are `global` (for `cloudfront`) as well as all AWS regions
(e.g. `eu-central-1`)
* `services` - (Required) Filter IP ranges by services. Valid items are `amazon`
(for amazon.com), `cloudfront`, `ec2`, `route53` and `route53_healthchecks`.
~> **NOTE:** If the specified combination of regions and services does not yield any
CIDR blocks, Terraform will fail.
## Attributes Reference
* `cidr_blocks` - The lexically ordered list of CIDR blocks.
* `create_date` - The publication time of the IP ranges (e.g. `2016-08-03-23-46-05`).
* `sync_token` - The publication time of the IP ranges, in Unix epoch time format
(e.g. `1470267965`).
[1]: http://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html

View File

@ -0,0 +1,37 @@
---
layout: "fastly"
page_title: "Fastly: fastly_ip_ranges"
sidebar_current: "docs-fastly-datasource-ip_ranges"
description: |-
Get information on Fastly IP ranges.
---
# fastly\_ip_ranges
Use this data source to get the [IP ranges][1] of Fastly edge nodes.
## Example Usage
```
data "fastly_ip_ranges" "fastly" {
}
resource "aws_security_group" "from_fastly" {
name = "from_fastly"
ingress {
from_port = "443"
to_port = "443"
protocol = "tcp"
cidr_blocks = [ "${data.fastly_ip_ranges.fastly.cidr_blocks}" ]
}
}
```
## Attributes Reference
* `cidr_blocks` - The lexically ordered list of CIDR blocks.
[1]: https://docs.fastly.com/guides/securing-communications/accessing-fastlys-ip-ranges

View File

@ -25,6 +25,9 @@
<li<%= sidebar_current("docs-aws-datasource-iam-policy-document") %>>
<a href="/docs/providers/aws/d/iam_policy_document.html">aws_iam_policy_document</a>
</li>
<li<%= sidebar_current("docs-aws-datasource-ip_ranges") %>>
<a href="/docs/providers/aws/d/ip_ranges.html">aws_ip_ranges</a>
</li>
<li<%= sidebar_current("docs-aws-datasource-s3-bucket-object") %>>
<a href="/docs/providers/aws/d/s3_bucket_object.html">aws_s3_bucket_object</a>
</li>

View File

@ -10,6 +10,15 @@
<a href="/docs/providers/fastly/index.html">Fastly Provider</a>
</li>
<li<%= sidebar_current(/^docs-fastly-datasource/) %>>
<a href="#">Data Sources</a>
<ul class="nav nav-visible">
<li<%= sidebar_current("docs-fastly-datasource-ip_ranges") %>>
<a href="/docs/providers/fastly/d/ip_ranges.html">fastly_ip_ranges</a>
</li>
</ul>
</li>
<li<%= sidebar_current(/^docs-fastly-resource/) %>>
<a href="#">Resources</a>