diff --git a/library/Aws/AwsClient.php b/library/Aws/AwsClient.php index 1b1fc24..501ef16 100644 --- a/library/Aws/AwsClient.php +++ b/library/Aws/AwsClient.php @@ -94,6 +94,7 @@ public function getEc2Instances() 'hypervisor' => 'Hypervisor', 'virt_type' => 'VirtualizationType', ), array( + 'vpc_id' => 'VpcId', 'root_device_type' => 'RootDeviceType', 'root_device_name' => 'RootDeviceName', 'public_ip' => 'PublicIpAddress', @@ -101,6 +102,13 @@ public function getEc2Instances() 'private_ip' => 'PrivateIpAddress', 'private_dns' => 'PrivateDnsName', )); + // no point in monitoring nodes that are not in ready state + // make sure sync rule maps disabled column to disabled property + if ($entry['State']['Name'] == 'running') { + $object->disabled = FALSE; + } else { + $object->disabled = TRUE; + } $object->monitoring_state = $entry['Monitoring']['State']; @@ -164,6 +172,9 @@ protected function extractTags($entry, $result) foreach ($entry['Tags'] as $t) { $result->tags->{$t['Key']} = $t['Value']; + // so we can use these tags in the expected way in import filters via tags.attribute + $result->{'tags.'.$t['Key']} = $t['Value']; + } } diff --git a/library/Aws/ProvidedHook/Director/ImportSource.php b/library/Aws/ProvidedHook/Director/ImportSource.php index e77e19d..f84856e 100644 --- a/library/Aws/ProvidedHook/Director/ImportSource.php +++ b/library/Aws/ProvidedHook/Director/ImportSource.php @@ -81,10 +81,12 @@ public function listColumns() 'root_device_name', 'hypervisor', 'virt_type', + 'vpc_id', 'public_ip', 'public_dns', 'private_ip', 'private_dns', + 'disabled', 'monitoring_state', 'tags', 'tags.Name',