Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch the default VPC instead of a random one #13

Merged
merged 2 commits into from
Apr 1, 2016
Merged

Conversation

brikis98
Copy link
Member

@brikis98 brikis98 commented Apr 1, 2016

We should not be using VPCs at random. Our tests create and destroy
VPCs all the time, so it's possible that one test will accidentally try
to use a VPC that another test is trying to destroy. This changes
terratest to return the default VPC instead of a random one.

We should not be using VPCs at random. Our tests create and destroy
VPCs all the time, so it's possible that one test will accidentally try
to use a VPC that another test is trying to destroy. This changes
terratest to return the default VPC instead of a random one.
import (
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/aws"
"errors"
"github.com/gruntwork-io/terratest/util"
"strconv"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import order. You may have commented on this in a separate PR.

@josh-padnick
Copy link
Contributor

Looks good, and will merge. One thought is that it is possible to delete the default VPC, but I don't think any of them are deleted in the PhxDevOps account. Still, something to be aware of. It looks like error handling will make this apparent if it comes up.

@josh-padnick josh-padnick merged commit bc28ab8 into master Apr 1, 2016
@josh-padnick josh-padnick deleted the default-vpc branch April 1, 2016 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants