riezebosch / vsts-tasks-packer

MIT License
15 stars 7 forks source link

Issue with AWS Credentials #10

Closed cadamantidis closed 4 years ago

cadamantidis commented 4 years ago

Hi there!

I have been attempting to use this extension to try and build some AMIs and am running into an issue with credentials.

I have a valid set of credentials that are setup in a Service Connection of type AWS. No matter what credentials I provide (I've used the correct ones that work with the terraform extension I'm using for the infrastructure part of this project) I get the following error:

[command]D:\azagent\A6\_work\_tool\packer\1.5.1\x64\packer.exe build -var access_key=*** -var secret_key=*** -var-file D:\azagent\A6\_work\5\s\platform\ami\configuration\variables.json -debug -color=false D:\azagent\A6\_work\5\s\platform\ami\configuration\dcfi_win_image.json
Debug mode enabled. Builds will not be parallelized.

Build 'amazon-ebs' errored: No valid credential sources found for AWS Builder. Please see https://www.packer.io/docs/builders/amazon.html#specifying-amazon-credentials for more information on providing credentials for the AWS Builder.

==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: No valid credential sources found for AWS Builder. Please see https://www.packer.io/docs/builders/amazon.html#specifying-amazon-credentials for more information on providing credentials for the AWS Builder.

==> Builds finished but no artifacts were created.

Feel like the values aren't being passed in at all, but I can't tell. Can you point me in the right direction to troubleshoot?

Thanks!

riezebosch commented 4 years ago

I've no experience in using the AWS provider, but my guess is you didn't use the expected variable names that are passed by this task to your packer template:

data variable name
Access Key ID access_key
Secret Access Key secret_key