Merge pull request #1131 from hashicorp/b-aws-subnet-vet
providers/aws: go vet fixes in aws_subnet
This commit is contained in:
commit
9270af6dfa
|
@ -68,10 +68,10 @@ func resourceAwsSubnetCreate(d *schema.ResourceData, meta interface{}) error {
|
||||||
// Get the ID and store it
|
// Get the ID and store it
|
||||||
subnet := resp.Subnet
|
subnet := resp.Subnet
|
||||||
d.SetId(*subnet.SubnetID)
|
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
|
// 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{
|
stateConf := &resource.StateChangeConf{
|
||||||
Pending: []string{"pending"},
|
Pending: []string{"pending"},
|
||||||
Target: "available",
|
Target: "available",
|
||||||
|
|
|
@ -15,11 +15,11 @@ func TestAccAWSSubnet(t *testing.T) {
|
||||||
|
|
||||||
testCheck := func(*terraform.State) error {
|
testCheck := func(*terraform.State) error {
|
||||||
if *v.CIDRBlock != "10.1.1.0/24" {
|
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 {
|
if *v.MapPublicIPOnLaunch != true {
|
||||||
return fmt.Errorf("bad MapPublicIpOnLaunch: %t", v.MapPublicIPOnLaunch)
|
return fmt.Errorf("bad MapPublicIpOnLaunch: %t", *v.MapPublicIPOnLaunch)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue