From 19089bd0749246277fb2f7bd2f073fbe1806accc Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Fri, 17 Jul 2020 13:38:43 -0700 Subject: [PATCH] upate standalone docs examples in amazon index file --- website/pages/docs/builders/amazon/index.mdx | 42 ++++++++++++++++++-- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/website/pages/docs/builders/amazon/index.mdx b/website/pages/docs/builders/amazon/index.mdx index ee6cc9dc2..a07e2d41e 100644 --- a/website/pages/docs/builders/amazon/index.mdx +++ b/website/pages/docs/builders/amazon/index.mdx @@ -67,15 +67,32 @@ explained below: Static credentials can be provided in the form of an access key id and secret. These look like: + + + ```json -{ +"builders": { + "type": "amazon-ebs" "access_key": "AKIAIOSFODNN7EXAMPLE", "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "region": "us-east-1", - "type": "amazon-ebs" } ``` + + + +```hcl +source "amazon-ebs" "basic-example" { + access_key = "AKIAIOSFODNN7EXAMPLE" + secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" + region = "us-east-1" +} +``` + + + + ### 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: + + + ```json -{ +"builders": { + "type": "amazon-ebs" "profile": "customprofile", "region": "us-east-1", - "type": "amazon-ebs" } ``` + + + +```hcl +source "amazon-ebs" "basic-example" { + profile = "customprofile" + region = "us-east-1" +} +``` + + + + + ### IAM Task or Instance Role Finally, Packer will use credentials provided by the task's or instance's IAM