Repository: cloud-custodian/cloud-custodian

Issue:
efs tag support
I am finding that searching for tagging of EFS resources does not consistently report the correct results.  It did find an EFS that was incorrectly tagged, but after it was corrected it continues to report the same resource.  I use the same filter for other resource types and do not see this behavior.

```
- name: efs-tag-compliance
  resource: efs
  description:
    Notify if an EFS does not comply with tagging best practices.
  mode:
      type: periodic
      schedule: "rate(24 hours)"
      role: arn:aws:iam::MYACCOUNT:role/cloud-custodian
  filters:
    - or:
      - "tag:CostCenter": absent
      - "tag:POC": absent
      - "tag:Service": absent
      - "tag:Name": absent
...
```


Discussion:
thanks for the bug report, its interesting, it looks like efs is using a paginator trick on tags to cover up internal latency.

Resolving patch:
diff --git a/c7n/resources/efs.py b/c7n/resources/efs.py
--- a/c7n/resources/efs.py
+++ b/c7n/resources/efs.py
@@ -27,6 +27,7 @@ class resource_type(object):
         name = 'Name'
         date = 'CreationTime'
         dimension = None
+        detail_spec = ('describe_tags', 'FileSystemId', 'FileSystemId', None)
 
 
 @ElasticFileSystem.action_registry.register('delete')


Test patch:
diff --git a/tests/data/placebo/test_efs_delete/elasticfilesystem.DescribeTags_1.json b/tests/data/placebo/test_efs_delete/elasticfilesystem.DescribeTags_1.json
new file mode 100644
--- /dev/null
+++ b/tests/data/placebo/test_efs_delete/elasticfilesystem.DescribeTags_1.json
@@ -0,0 +1,30 @@
+{
+    "status_code": 200, 
+    "data": {
+        "ResponseMetadata": {
+            "RetryAttempts": 0, 
+            "HTTPStatusCode": 200, 
+            "RequestId": "d6e6f4a2-13e8-11e7-a10d-03dc08f89c32", 
+            "HTTPHeaders": {
+                "x-amzn-requestid": "d6e6f4a2-13e8-11e7-a10d-03dc08f89c32", 
+                "date": "Tue, 28 Mar 2017 19:00:41 GMT", 
+                "content-length": "142", 
+                "content-type": "application/json"
+            }
+        }, 
+        "Tags": [
+            {
+                "Value": "MyDocs", 
+                "Key": "Name"
+            }, 
+            {
+                "Value": "Test User", 
+                "Key": "POC"
+            }, 
+            {
+                "Value": "skunk", 
+                "Key": "Service"
+            }
+        ]
+    }
+}
\ No newline at end of file
diff --git a/tests/data/placebo/test_efs_query/elasticfilesystem.DescribeTags_1.json b/tests/data/placebo/test_efs_query/elasticfilesystem.DescribeTags_1.json
new file mode 100644
--- /dev/null
+++ b/tests/data/placebo/test_efs_query/elasticfilesystem.DescribeTags_1.json
@@ -0,0 +1,30 @@
+{
+    "status_code": 200, 
+    "data": {
+        "ResponseMetadata": {
+            "RetryAttempts": 0, 
+            "HTTPStatusCode": 200, 
+            "RequestId": "d6e6f4a2-13e8-11e7-a10d-03dc08f89c32", 
+            "HTTPHeaders": {
+                "x-amzn-requestid": "d6e6f4a2-13e8-11e7-a10d-03dc08f89c32", 
+                "date": "Tue, 28 Mar 2017 19:00:41 GMT", 
+                "content-length": "142", 
+                "content-type": "application/json"
+            }
+        }, 
+        "Tags": [
+            {
+                "Value": "MyDocs", 
+                "Key": "Name"
+            }, 
+            {
+                "Value": "Test User", 
+                "Key": "POC"
+            }, 
+            {
+                "Value": "skunk", 
+                "Key": "Service"
+            }
+        ]
+    }
+}
\ No newline at end of file