From be3cb3d3173ec9e94db8f6ffd0e486af3df6f801 Mon Sep 17 00:00:00 2001 From: saravanan30erd Date: Fri, 26 Oct 2018 23:28:43 +0400 Subject: [PATCH] Typo in data_source_aws_network_interface --- aws/data_source_aws_network_interface.go | 2 +- aws/data_source_aws_network_interface_test.go | 7 +++++++ website/docs/d/network_interface.html.markdown | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/aws/data_source_aws_network_interface.go b/aws/data_source_aws_network_interface.go index 85834577041..51b91b49a15 100644 --- a/aws/data_source_aws_network_interface.go +++ b/aws/data_source_aws_network_interface.go @@ -175,7 +175,7 @@ func dataSourceAwsNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) d.Set("mac_address", eni.MacAddress) d.Set("owner_id", eni.OwnerId) d.Set("private_dns_name", eni.PrivateDnsName) - d.Set("private_id", eni.PrivateIpAddress) + d.Set("private_ip", eni.PrivateIpAddress) d.Set("private_ips", flattenNetworkInterfacesPrivateIPAddresses(eni.PrivateIpAddresses)) d.Set("requester_id", eni.RequesterId) d.Set("subnet_id", eni.SubnetId) diff --git a/aws/data_source_aws_network_interface_test.go b/aws/data_source_aws_network_interface_test.go index 6c1dba33e4f..32fe393338b 100644 --- a/aws/data_source_aws_network_interface_test.go +++ b/aws/data_source_aws_network_interface_test.go @@ -19,6 +19,13 @@ func TestAccDataSourceAwsNetworkInterface_basic(t *testing.T) { Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("data.aws_network_interface.test", "private_ips.#", "1"), resource.TestCheckResourceAttr("data.aws_network_interface.test", "security_groups.#", "1"), + resource.TestCheckResourceAttrPair("data.aws_network_interface.test", "private_ip", "aws_network_interface.test", "private_ip"), + resource.TestCheckResourceAttrSet("data.aws_network_interface.test", "availability_zone"), + resource.TestCheckResourceAttrPair("data.aws_network_interface.test", "description", "aws_network_interface.test", "description"), + resource.TestCheckResourceAttrSet("data.aws_network_interface.test", "interface_type"), + resource.TestCheckResourceAttrPair("data.aws_network_interface.test", "private_dns_name", "aws_network_interface.test", "private_dns_name"), + resource.TestCheckResourceAttrPair("data.aws_network_interface.test", "subnet_id", "aws_network_interface.test", "subnet_id"), + resource.TestCheckResourceAttrSet("data.aws_network_interface.test", "vpc_id"), ), }, }, diff --git a/website/docs/d/network_interface.html.markdown b/website/docs/d/network_interface.html.markdown index 21244eb5d33..400ae982122 100644 --- a/website/docs/d/network_interface.html.markdown +++ b/website/docs/d/network_interface.html.markdown @@ -33,11 +33,19 @@ Additionally, the following attributes are exported: * `association` - The association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below. * `availability_zone` - The Availability Zone. +* `description` - Description of the network interface. * `interface_type` - The type of interface. * `ipv6_addresses` - List of IPv6 addresses to assign to the ENI. * `mac_address` - The MAC address. * `owner_id` - The AWS account ID of the owner of the network interface. +* `private_dns_name` - The private DNS name. +* `private_ip` - The private IPv4 address of the network interface within the subnet. +* `private_ips` - The private IPv4 addresses associated with the network interface. * `requester_id` - The ID of the entity that launched the instance on your behalf. +* `security_groups` - The list of security groups for the network interface. +* `subnet_id` - The ID of the subnet. +* `tags` - Any tags assigned to the network interface. +* `vpc_id` - The ID of the VPC. ### `association`