|
|
|
|
@ -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
|
|
|
|
|
|