aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/go-getter/README.md
diff options
context:
space:
mode:
authorAlex Pilon <apilon@hashicorp.com>2019-02-22 18:24:37 -0500
committerAlex Pilon <apilon@hashicorp.com>2019-02-22 18:24:37 -0500
commit15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (patch)
tree255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/github.com/hashicorp/go-getter/README.md
parent07971ca38143c5faf951d152fba370ddcbe26ad5 (diff)
downloadterraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.gz
terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.zst
terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.zip
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
Updated via: go get github.com/hashicorp/terraform@sdk-v0.11-with-go-modules and go mod tidy
Diffstat (limited to 'vendor/github.com/hashicorp/go-getter/README.md')
-rw-r--r--vendor/github.com/hashicorp/go-getter/README.md58
1 files changed, 53 insertions, 5 deletions
diff --git a/vendor/github.com/hashicorp/go-getter/README.md b/vendor/github.com/hashicorp/go-getter/README.md
index 4a0b6a6..40ace74 100644
--- a/vendor/github.com/hashicorp/go-getter/README.md
+++ b/vendor/github.com/hashicorp/go-getter/README.md
@@ -21,8 +21,7 @@ URLs. For example: "github.com/hashicorp/go-getter" would turn into a
21Git URL. Or "./foo" would turn into a file URL. These are extensible. 21Git URL. Or "./foo" would turn into a file URL. These are extensible.
22 22
23This library is used by [Terraform](https://terraform.io) for 23This library is used by [Terraform](https://terraform.io) for
24downloading modules, [Otto](https://ottoproject.io) for dependencies and 24downloading modules and [Nomad](https://nomadproject.io) for downloading
25Appfile imports, and [Nomad](https://nomadproject.io) for downloading
26binaries. 25binaries.
27 26
28## Installation and Usage 27## Installation and Usage
@@ -119,6 +118,37 @@ The protocol-specific options are documented below the URL format
119section. But because they are part of the URL, we point it out here so 118section. But because they are part of the URL, we point it out here so
120you know they exist. 119you know they exist.
121 120
121### Subdirectories
122
123If you want to download only a specific subdirectory from a downloaded
124directory, you can specify a subdirectory after a double-slash `//`.
125go-getter will first download the URL specified _before_ the double-slash
126(as if you didn't specify a double-slash), but will then copy the
127path after the double slash into the target directory.
128
129For example, if you're downloading this GitHub repository, but you only
130want to download the `test-fixtures` directory, you can do the following:
131
132```
133https://github.com/hashicorp/go-getter.git//test-fixtures
134```
135
136If you downloaded this to the `/tmp` directory, then the file
137`/tmp/archive.gz` would exist. Notice that this file is in the `test-fixtures`
138directory in this repository, but because we specified a subdirectory,
139go-getter automatically copied only that directory contents.
140
141Subdirectory paths may contain may also use filesystem glob patterns.
142The path must match _exactly one_ entry or go-getter will return an error.
143This is useful if you're not sure the exact directory name but it follows
144a predictable naming structure.
145
146For example, the following URL would also work:
147
148```
149https://github.com/hashicorp/go-getter.git//test-*
150```
151
122### Checksumming 152### Checksumming
123 153
124For file downloads of any protocol, go-getter can automatically verify 154For file downloads of any protocol, go-getter can automatically verify
@@ -154,9 +184,11 @@ The following archive formats are supported:
154 184
155 * `tar.gz` and `tgz` 185 * `tar.gz` and `tgz`
156 * `tar.bz2` and `tbz2` 186 * `tar.bz2` and `tbz2`
187 * `tar.xz` and `txz`
157 * `zip` 188 * `zip`
158 * `gz` 189 * `gz`
159 * `bz2` 190 * `bz2`
191 * `xz`
160 192
161For example, an example URL is shown below: 193For example, an example URL is shown below:
162 194
@@ -200,6 +232,9 @@ The options below are available to all protocols:
200 * `checksum` - Checksum to verify the downloaded file or archive. See 232 * `checksum` - Checksum to verify the downloaded file or archive. See
201 the entire section on checksumming above for format and more details. 233 the entire section on checksumming above for format and more details.
202 234
235 * `filename` - When in file download mode, allows specifying the name of the
236 downloaded file on disk. Has no effect in directory mode.
237
203### Local Files (`file`) 238### Local Files (`file`)
204 239
205None 240None
@@ -222,13 +257,17 @@ None
222 257
223### HTTP (`http`) 258### HTTP (`http`)
224 259
225None 260#### Basic Authentication
261
262To use HTTP basic authentication with go-getter, simply prepend `username:password@` to the
263hostname in the URL such as `https://Aladdin:OpenSesame@www.example.com/index.html`. All special
264characters, including the username and password, must be URL encoded.
226 265
227### S3 (`s3`) 266### S3 (`s3`)
228 267
229S3 takes various access configurations in the URL. Note that it will also 268S3 takes various access configurations in the URL. Note that it will also
230read these from standard AWS environment variables if they're set. If 269read these from standard AWS environment variables if they're set. S3 compliant servers like Minio
231the query parameters are present, these take priority. 270are also supported. If the query parameters are present, these take priority.
232 271
233 * `aws_access_key_id` - AWS access key. 272 * `aws_access_key_id` - AWS access key.
234 * `aws_access_key_secret` - AWS access key secret. 273 * `aws_access_key_secret` - AWS access key secret.
@@ -240,6 +279,14 @@ If you use go-getter and want to use an EC2 IAM Instance Profile to avoid
240using credentials, then just omit these and the profile, if available will 279using credentials, then just omit these and the profile, if available will
241be used automatically. 280be used automatically.
242 281
282### Using S3 with Minio
283 If you use go-gitter for Minio support, you must consider the following:
284
285 * `aws_access_key_id` (required) - Minio access key.
286 * `aws_access_key_secret` (required) - Minio access key secret.
287 * `region` (optional - defaults to us-east-1) - Region identifier to use.
288 * `version` (optional - defaults to Minio default) - Configuration file format.
289
243#### S3 Bucket Examples 290#### S3 Bucket Examples
244 291
245S3 has several addressing schemes used to reference your bucket. These are 292S3 has several addressing schemes used to reference your bucket. These are
@@ -250,4 +297,5 @@ Some examples for these addressing schemes:
250- s3::https://s3-eu-west-1.amazonaws.com/bucket/foo 297- s3::https://s3-eu-west-1.amazonaws.com/bucket/foo
251- bucket.s3.amazonaws.com/foo 298- bucket.s3.amazonaws.com/foo
252- bucket.s3-eu-west-1.amazonaws.com/foo/bar 299- bucket.s3-eu-west-1.amazonaws.com/foo/bar
300- "s3::http://127.0.0.1:9000/test-bucket/hello.txt?aws_access_key_id=KEYID&aws_access_key_secret=SECRETKEY&region=us-east-2"
253 301