ran go fmt and made 1 fix after running tests again
This commit is contained in:
parent
34d2efa7df
commit
e4214a9983
|
@ -8,10 +8,10 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/hashicorp/aws-sdk-go/aws"
|
||||
"github.com/hashicorp/aws-sdk-go/gen/ec2"
|
||||
"github.com/hashicorp/terraform/helper/hashcode"
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
"github.com/hashicorp/terraform/helper/schema"
|
||||
"github.com/hashicorp/aws-sdk-go/gen/ec2"
|
||||
)
|
||||
|
||||
func resourceAwsNetworkInterface() *schema.Resource {
|
||||
|
@ -125,7 +125,8 @@ func resourceAwsNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) e
|
|||
d.Set("security_groups", flattenGroupIdentifiers(eni.Groups))
|
||||
|
||||
if eni.Attachment != nil {
|
||||
d.Set("attachment", flattenAttachment(eni.Attachment))
|
||||
attachment := []map[string]interface{} { flattenAttachment(eni.Attachment) }
|
||||
d.Set("attachment", attachment)
|
||||
} else {
|
||||
d.Set("attachment", nil)
|
||||
}
|
||||
|
|
|
@ -162,7 +162,6 @@ func testAccCheckAWSENIDestroy(s *terraform.State) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
|
||||
const testAccAWSENIConfig = `
|
||||
resource "aws_vpc" "foo" {
|
||||
cidr_block = "172.16.0.0/16"
|
||||
|
|
|
@ -271,9 +271,9 @@ func TestExpandInstanceString(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFlattenNetworkInterfacesPrivateIPAddesses(t *testing.T) {
|
||||
expanded := []ec2.NetworkInterfacePrivateIPAddress {
|
||||
ec2.NetworkInterfacePrivateIPAddress { PrivateIPAddress: aws.String("192.168.0.1") },
|
||||
ec2.NetworkInterfacePrivateIPAddress { PrivateIPAddress: aws.String("192.168.0.2") },
|
||||
expanded := []ec2.NetworkInterfacePrivateIPAddress{
|
||||
ec2.NetworkInterfacePrivateIPAddress{PrivateIPAddress: aws.String("192.168.0.1")},
|
||||
ec2.NetworkInterfacePrivateIPAddress{PrivateIPAddress: aws.String("192.168.0.2")},
|
||||
}
|
||||
|
||||
result := flattenNetworkInterfacesPrivateIPAddesses(expanded)
|
||||
|
@ -296,9 +296,9 @@ func TestFlattenNetworkInterfacesPrivateIPAddesses(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFlattenGroupIdentifiers(t *testing.T) {
|
||||
expanded := []ec2.GroupIdentifier {
|
||||
ec2.GroupIdentifier { GroupID: aws.String("sg-001") },
|
||||
ec2.GroupIdentifier { GroupID: aws.String("sg-002") },
|
||||
expanded := []ec2.GroupIdentifier{
|
||||
ec2.GroupIdentifier{GroupID: aws.String("sg-001")},
|
||||
ec2.GroupIdentifier{GroupID: aws.String("sg-002")},
|
||||
}
|
||||
|
||||
result := flattenGroupIdentifiers(expanded)
|
||||
|
@ -320,7 +320,7 @@ func TestExpandPrivateIPAddesses(t *testing.T) {
|
|||
|
||||
ip1 := "192.168.0.1"
|
||||
ip2 := "192.168.0.2"
|
||||
flattened := []interface{} {
|
||||
flattened := []interface{}{
|
||||
ip1,
|
||||
ip2,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue