Megan Marsh
ca9a5daf29
fix proxy and tls
2019-03-04 16:41:31 -08:00
Megan Marsh
3704a053d0
move region validation and credential wait into step pre validate
2019-02-05 14:07:04 -08:00
Megan Marsh
8add176ab7
finish first pass at vault code; needs testing and cleanup of error messages
2019-02-04 15:54:14 -08:00
Megan Marsh
7a78b47e83
make vault engine stuff into a little struct for easier management
2019-02-04 15:29:45 -08:00
Megan Marsh
035c3506ba
manually set proxyfromenvironment in default http client for ec2 sessions
2019-01-25 12:33:25 -08:00
Adrien Delorme
4a2773f8fa
remove default max retries config of 8, it will now be used from env
...
removing the code that wants to guess region from metadata allows us to change that setting, which can now be taken from environment.
2019-01-25 13:51:02 +01:00
Adrien Delorme
964b149df2
aws: remove now unused AccessConfig.metadataRegion
2019-01-25 13:03:14 +01:00
Adrien Delorme
335f442b51
aws: unwrap AccessConfig.region func
...
* it was used only in the Session() call.
* default region guessing from metadata should happen in the SDK, not 'manually'
2019-01-25 13:02:42 +01:00
Adrien Delorme
54af9951a8
make guard clauses to clearly see success pass
2019-01-25 13:00:21 +01:00
Adrien Delorme
0864b4d07b
name unclear import
2019-01-25 12:59:43 +01:00
Megan Marsh
e0543246fa
remove commented code
2019-01-16 11:05:11 -08:00
Megan Marsh
783ed32e7e
fix region stuff
2019-01-16 11:02:58 -08:00
Megan Marsh
042e9ad14b
Move logging about aws waiters to the access config prepare() so that it's only spit out once per builder.
2018-12-06 14:37:31 -08:00
Megan Marsh
fbb3d526e3
move region validation to run so that we don't break validation when we don't have aws creds set
2018-11-20 15:01:28 -08:00
Megan Marsh
79862f1bbb
Merge pull request #6931 from hashicorp/fix_6919
...
aws: better error handling of region/credential guessing from metadata
2018-11-05 11:24:09 -08:00
Adrien Delorme
3f288fc6ca
aws client: config.WithMaxRetries(8)
2018-11-01 15:09:07 +01:00
Mikhail Ushanov
4608b5d39d
amazon: add option for skipping TLS verification
...
Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
2018-10-29 21:35:29 +03:00
Adrien Delorme
f4fbf45349
remove duplicate region check error
2018-10-26 17:44:56 +02:00
Adrien Delorme
16aa21dffe
aws: better error handling of region guessing from metadata
...
* this will fix #6919
2018-10-26 12:24:10 +02:00
Adrien Delorme
ed793a8fb8
make ValidateRegion a member of *AccessConfig and make it variadic
2018-10-24 11:26:53 +02:00
Megan Marsh
340009009d
Revert "Revert "Merge pull request #6892 from hashicorp/fix_6890""
...
This reverts commit 0cd3f36d50
.
2018-10-23 09:58:27 -07:00
Megan Marsh
0cd3f36d50
Revert "Merge pull request #6892 from hashicorp/fix_6890"
...
This reverts commit 1c4062c316
, reversing
changes made to 9bc41a23b9
.
2018-10-23 09:34:05 -07:00
Megan Marsh
0924a316b7
fix template-set credentials
...
update tests with mocked session
2018-10-22 13:53:40 -07:00
Megan Marsh
b0cfecf314
remove unnecessary valid flag
2018-10-17 11:03:31 -07:00
Megan Marsh
7c3f0aa3b2
make sure region validation catches authentication errors
2018-10-16 14:17:30 -07:00
Megan Marsh
93f1155a14
remove test-related special casing
2018-09-18 08:08:36 -07:00
Matt DeBoer
09797df958
use a UI wrapper to auto-decode error messages
...
update docs to reflect optional config
2018-09-11 16:05:43 -07:00
Megan Marsh
2b9f937c23
increase max retries from 3 to 20
2018-08-30 09:35:06 -07:00
Matthew Hooker
b16f2ec64b
builder/amazon: Use sdk default cred providers
...
I think we were overcomplicating things. The SDK provides the correct
credential chain by default, so let's use that. This patch does a quick
check for static credentials and uses those if found, then defaults to
the default credential provider chain.
This patch also removes the metadata timeout argument. Current versions
of the SDK have short timeouts by default, so I don't believe this is
needed.
2018-03-15 16:49:47 -07:00
Matthew Hooker
e483087574
builder/amazon: Use service default retries.
...
Each service has its own preconfigured number of times to retry.
Lets use that instead of setting a global number.
2018-03-14 22:26:35 -07:00
Matthew Hooker
2806523834
Fix issue with assume role credentials
2018-02-15 14:54:01 -08:00
Matthew Hooker
5b64f71702
Merge pull request #5764 from hashicorp/fix5760
...
"borrow" access config code from terraform.
2018-02-08 14:55:43 -08:00
Matthew Hooker
21812fa17f
Add volume and run tags if in us-gov/china
...
We can't tag on instance creation when we're in "restricted" regions,
so let's add the tags after the resources have been created.
Adds methods to AccessConfig to detect if we're in China or US Gov
regions (i.e. "restricted").
Also turns tag:tag maps into a type, and moves methods around validating
and converting them to ec2Tags to methods of the type.
2018-02-05 16:39:20 -08:00
Matthew Hooker
c5bcb97d06
"borrow" access config code from terraform.
...
This gives us a few benefits:
* timeout early if metadata service can't be reached
* report which auth provider we're using
* give much better errors if something goes wrong
2018-01-04 15:04:07 -08:00
Matthew Hooker
98c2a2d1f7
builder/aws: catch static credential errors early.
...
If we're using static credentials, either both the access key and secret key must be set, or neither of them should be.
2018-01-04 11:50:27 -08:00
Matthew Hooker
7b5c0900ef
Correctly set aws region if given in template along with a profile.
2017-12-07 11:12:57 -08:00
Matthew Hooker
0a24f4eb2e
don't shadow package name
2017-11-07 16:05:43 -08:00
Matthew Hooker
545ee45567
debug region we found
2017-11-07 14:51:20 -08:00
Matthew Hooker
c106e7c26c
Don't set region from metadata if profile is set.
2017-11-07 14:33:26 -08:00
Matthew Hooker
52fc0100eb
this is a critical error
2017-11-07 12:52:03 -08:00
Matthew Hooker
d322fc6c19
Shorten metadata timeout
...
When running in travis, metadata requests will timeout after 5 seconds.
After 24 such timeouts, we'll hit travis' build timeout of two minutes,
and the build will fail. Lowering it to 100 gets us in a safe time
limit. We _may_ need to expose a timeout env var with this logic,
however.
2017-10-30 15:22:15 -07:00
Matthew Hooker
314fc94bd8
clean up
2017-10-30 15:02:39 -07:00
Matthew Hooker
0e4ea7420b
fix tests
2017-10-30 14:34:16 -07:00
Matthew Hooker
c65fa8490d
fix various bugs deregistering AMIs
...
always deregister ami in session region
validate that session region does not appear in ami_regions
2017-10-30 14:17:19 -07:00
Matthew Hooker
febc65aa7c
try again to get region from metadata
2017-06-14 16:30:18 -07:00
Matthew Hooker
350e8bfe0d
we don't need to look for region in metadata.
...
Closes #4615'
2017-06-13 17:35:48 -07:00
Matthew Hooker
a619759bf7
add support for profile
2017-06-09 11:24:30 -07:00
Matthew Hooker
3fb4162660
remove code from bad merge
2017-06-09 11:07:29 -07:00
Matthew Hooker
624aaa2067
bugfix
2017-06-09 11:01:27 -07:00
Matthew Hooker
f637878822
with wrapping
2017-06-09 10:46:01 -07:00