Merge pull request #7205 from hashicorp/fix_7196

fix region stuff
pull/7222/head
Megan Marsh 7 years ago committed by GitHub
commit d0e5c67dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -54,11 +54,7 @@ func (c *AccessConfig) Session() (*session.Session, error) {
// retries are exponentially backed off.
config = config.WithMaxRetries(8)
region, err := c.region()
if err != nil {
return nil, fmt.Errorf("Could not get region, "+
"probably because it's not set or we're not running on AWS. %s", err)
}
region, _ := c.region()
config = config.WithRegion(region)
if c.CustomEndpointEc2 != "" {

@ -34,6 +34,9 @@ func (c *AccessConfig) ValidateRegion(regions ...string) error {
var invalidRegions []string
for _, region := range regions {
if region == "" {
continue
}
found := false
for _, validRegion := range validRegions {
if region == validRegion {

Loading…
Cancel
Save