Merge pull request #1232 from hashicorp/f-s3-artifact-examples

Add several more s3 examples to artifact docs
This commit is contained in:
Alex Dadgar 2016-06-03 15:08:56 -07:00
commit e5e14e0ecd
2 changed files with 64 additions and 0 deletions

View File

@ -471,6 +471,35 @@ artifact {
}
```
#### S3 examples
S3 has several different types of addressing and more detail can be found
[here](http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro)
S3 region specific endpoints can be found
[here](http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
Path based style:
```
artifact {
source = "https://s3-us-west-2.amazonaws.com/my-bucket-example/my_app.tar.gz"
}
```
or to override automatic detection in the url, use the s3 specific syntax
```
artifact {
source = "s3::https://s3-eu-west-1.amazonaws.com/my-bucket-example/my_app.tar.gz"
}
```
Virtual hosted based style
```
artifact {
source = "my-bucket-example.s3-eu-west-1.amazonaws.com/my_app.tar.gz"
}
```
## JSON Syntax
Job files can also be specified in JSON. The conversion is straightforward

View File

@ -529,3 +529,38 @@ An example of downloading and unzipping an archive is as simple as:
}
]
```
#### S3 examples
S3 has several different types of addressing and more detail can be found
[here](http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro)
S3 region specific endpoints can be found
[here](http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
Path based style:
```
"Artifacts": [
{
"GetterSource": "https://s3-us-west-2.amazonaws.com/my-bucket-example/my_app.tar.gz",
}
]
```
or to override automatic detection in the url, use the s3 specific syntax
```
"Artifacts": [
{
"GetterSource": "s3::https://s3-eu-west-1.amazonaws.com/my-bucket-example/my_app.tar.gz",
}
]
```
Virtual hosted based style
```
"Artifacts": [
{
"GetterSource": "my-bucket-example.s3-eu-west-1.amazonaws.com/my_app.tar.gz",
}
]
```