Merge pull request #1131 from hashicorp/b-aws-subnet-vet

providers/aws: go vet fixes in aws_subnet
This commit is contained in:
Paul Hinze 2015-03-05 14:57:18 -06:00
commit 9270af6dfa
2 changed files with 4 additions and 4 deletions

View File

@ -68,10 +68,10 @@ func resourceAwsSubnetCreate(d *schema.ResourceData, meta interface{}) error {
// Get the ID and store it
subnet := resp.Subnet
d.SetId(*subnet.SubnetID)
log.Printf("[INFO] Subnet ID: %s", subnet.SubnetID)
log.Printf("[INFO] Subnet ID: %s", *subnet.SubnetID)
// Wait for the Subnet to become available
log.Printf("[DEBUG] Waiting for subnet (%s) to become available", subnet.SubnetID)
log.Printf("[DEBUG] Waiting for subnet (%s) to become available", *subnet.SubnetID)
stateConf := &resource.StateChangeConf{
Pending: []string{"pending"},
Target: "available",

View File

@ -15,11 +15,11 @@ func TestAccAWSSubnet(t *testing.T) {
testCheck := func(*terraform.State) error {
if *v.CIDRBlock != "10.1.1.0/24" {
return fmt.Errorf("bad cidr: %s", v.CIDRBlock)
return fmt.Errorf("bad cidr: %s", *v.CIDRBlock)
}
if *v.MapPublicIPOnLaunch != true {
return fmt.Errorf("bad MapPublicIpOnLaunch: %t", v.MapPublicIPOnLaunch)
return fmt.Errorf("bad MapPublicIpOnLaunch: %t", *v.MapPublicIPOnLaunch)
}
return nil