provider/fastly: Documentation updates

This commit is contained in:
clint shryock 2016-03-24 09:53:25 -05:00
parent 2ad37bba4a
commit 3dcbdf0e28
2 changed files with 16 additions and 9 deletions

View File

@ -44,7 +44,7 @@ explained below:
### Static API Key ### ### Static API Key ###
Static credentials can be provided by adding a `api_key` in-line in the Static credentials can be provided by adding a `api_key` in-line in the
fastly provider block: Fastly provider block:
Usage: Usage:
@ -52,6 +52,10 @@ Usage:
provider "fastly" { provider "fastly" {
api_key = "test" api_key = "test"
} }
resource "fastly_service_v1" "myservice" {
...
}
``` ```
The API key for an account can be found on the Account page: https://app.fastly.com/#account The API key for an account can be found on the Account page: https://app.fastly.com/#account
@ -59,10 +63,13 @@ The API key for an account can be found on the Account page: https://app.fastly.
###Environment variables ###Environment variables
You can provide your API key via `FASTLY_API_KEY` environment variable, You can provide your API key via `FASTLY_API_KEY` environment variable,
representing your Fastly API key. representing your Fastly API key. When using this method, you may omit the
Fastly `provider` block entirely:
``` ```
provider "fastly" {} resource "fastly_service_v1" "myservice" {
...
}
``` ```
Usage: Usage:

View File

@ -8,12 +8,12 @@ description: |-
# fastly\_service\_v1 # fastly\_service\_v1
Provides an Fastly Service, representing the configuration for a website, app, Provides a Fastly Service, representing the configuration for a website, app,
api, or anything else to be served through Fastly. A Service encompasses Domains api, or anything else to be served through Fastly. A Service encompasses Domains
and Backends. and Backends.
The Service resource requires a domain name that is correctly set up to direct The Service resource requires a domain name that is correctly set up to direct
traffic to the Fastly service. See Fastly's guide on [Adding CNAME Records][2] traffic to the Fastly service. See Fastly's guide on [Adding CNAME Records][fastly-cname]
on their documentation site for guidance. on their documentation site for guidance.
## Example Usage ## Example Usage
@ -76,7 +76,7 @@ resource "aws_s3_bucket" "website" {
**Note:** For an AWS S3 Bucket, the Backend address is **Note:** For an AWS S3 Bucket, the Backend address is
`<domain>.s3-website-<region>.amazonaws.com`. The `default_host` attribute `<domain>.s3-website-<region>.amazonaws.com`. The `default_host` attribute
should be set to `<bucket_name>.s3-website-<region>.amazonaws.com`. See the should be set to `<bucket_name>.s3-website-<region>.amazonaws.com`. See the
Fastly documentation on [Amazon S3][1] Fastly documentation on [Amazon S3][fastly-s3]
## Argument Reference ## Argument Reference
@ -131,6 +131,6 @@ The following attributes are exported:
* `force_destroy` - Force the destruction of the Service on delete * `force_destroy` - Force the destruction of the Service on delete
[1]: https://docs.fastly.com/guides/integrations/amazon-s3 [fastly-s3]: https://docs.fastly.com/guides/integrations/amazon-s3
[2]: https://docs.fastly.com/guides/basic-setup/adding-cname-records [fastly-cname]: https://docs.fastly.com/guides/basic-setup/adding-cname-records