mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-22 07:51:39 -04:00
upate standalone docs examples in amazon index file
This commit is contained in:
@@ -67,15 +67,32 @@ explained below:
|
||||
Static credentials can be provided in the form of an access key id and secret.
|
||||
These look like:
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="JSON">
|
||||
|
||||
```json
|
||||
{
|
||||
"builders": {
|
||||
"type": "amazon-ebs"
|
||||
"access_key": "AKIAIOSFODNN7EXAMPLE",
|
||||
"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
|
||||
"region": "us-east-1",
|
||||
"type": "amazon-ebs"
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="HCL2">
|
||||
|
||||
```hcl
|
||||
source "amazon-ebs" "basic-example" {
|
||||
access_key = "AKIAIOSFODNN7EXAMPLE"
|
||||
secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
|
||||
region = "us-east-1"
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Environment variables
|
||||
|
||||
You can provide your credentials via the `AWS_ACCESS_KEY_ID` and
|
||||
@@ -110,14 +127,31 @@ The format for the credentials file is like so
|
||||
You may also configure the profile to use by setting the `profile`
|
||||
configuration option, or setting the `AWS_PROFILE` environment variable:
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="JSON">
|
||||
|
||||
```json
|
||||
{
|
||||
"builders": {
|
||||
"type": "amazon-ebs"
|
||||
"profile": "customprofile",
|
||||
"region": "us-east-1",
|
||||
"type": "amazon-ebs"
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab heading="HCL2">
|
||||
|
||||
```hcl
|
||||
source "amazon-ebs" "basic-example" {
|
||||
profile = "customprofile"
|
||||
region = "us-east-1"
|
||||
}
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
|
||||
### IAM Task or Instance Role
|
||||
|
||||
Finally, Packer will use credentials provided by the task's or instance's IAM
|
||||
|
||||
Reference in New Issue
Block a user