kapilt: @pendyalal do you have a policy that went with?
pendyalal: policies:

 -  name: event-rule-tag
    resource: event-rule
    filters:
        type: value
        key: RuleName
        value: custodian
        value_type: normalize
        op: contains
        actions:
        type: tag
        key: 'owner'
        value: 'lakshmi'
        type: tag
        key: 'Project'
        value: 'Infrastructure'
        type: tag
        key: 'ProjectId'
        value: '1234567'

diff --git a/Makefile b/Makefile
index c2b37e65a..fe9cd569a 100644
--- a/Makefile
+++ b/Makefile
@@ -85,7 +85,6 @@ ftest:
 
 sphinx:
 # if this errors either tox -e docs or cd tools/c7n_sphinext && poetry install
-	which c7n-sphinxext
 	make -f docs/Makefile.sphinx html
 
 ghpages:
diff --git a/c7n/query.py b/c7n/query.py
index 78b2cf986..c254b0d24 100644
--- a/c7n/query.py
+++ b/c7n/query.py
@@ -142,7 +142,12 @@ class ChildResourceQuery(ResourceQuery):
 
         parent_type, parent_key, annotate_parent = m.parent_spec
         parents = self.manager.get_resource_manager(parent_type)
-        parent_ids = [p[parents.resource_type.id] for p in parents.resources()]
+        parent_ids = []
+        for p in parents.resources(augment=False):
+            if isinstance(p, str):
+                parent_ids.append(p)
+            else:
+                parent_ids.append(p[parents.resource_type.id])
 
         # Bail out with no parent ids...
         existing_param = parent_key in params
diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py
index 7a0ff0dad..b0ccf6e14 100644
--- a/c7n/resources/cw.py
+++ b/c7n/resources/cw.py
@@ -82,13 +82,16 @@ class EventRule(QueryResourceManager):
 
     class resource_type(TypeInfo):
         service = 'events'
-        arn_type = 'event-rule'
+        arn_type = 'rule'
         enum_spec = ('list_rules', 'Rules', None)
         name = "Name"
         id = "Name"
         filter_name = "NamePrefix"
         filter_type = "scalar"
         cfn_type = 'AWS::Events::Rule'
+        universal_taggable = object()
+
+    augment = universal_augment
 
 
 @EventRule.filter_registry.register('metrics')
diff --git a/c7n/resources/vpc.py b/c7n/resources/vpc.py
index a81b0e2f4..df4023b33 100644
--- a/c7n/resources/vpc.py
+++ b/c7n/resources/vpc.py
@@ -766,7 +766,8 @@ class SGUsage(Filter):
         sg_ids = set()
         expr = jmespath.compile(
             'EcsParameters.NetworkConfiguration.awsvpcConfiguration.SecurityGroups[]')
-        for rule in self.manager.get_resource_manager('event-rule-target').resources():
+        for rule in self.manager.get_resource_manager(
+                'event-rule-target').resources(augment=False):
             ids = expr.search(rule)
             if ids:
                 sg_ids.update(ids)
diff --git a/tox.ini b/tox.ini
index 58cafa670..876cdba6e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -84,8 +84,6 @@ commands = make lint
 [testenv:docs]
 whitelist_externals = make
 commands = make sphinx
-setenv =
-   PATH="$PWD/.tox/docs/bin:$PATH"
 deps =
   -rrequirements-dev.txt
   -rrequirements-docs.txt

cloudwatch event-rule tagging
**Is your feature request related to a problem? Please describe.**
It would be nice if Custodian support event rule tagging.

policies:
  - name: event-rule-tag
    resource: event-rule
    filters:
     - type: value
       key: RuleName
       value: custodian
       value_type: normalize
       op: contains
    actions:
     - type: tag
       key: 'owner'
       value: 'lakshmi'
     - type: tag
       key: 'Project'
       value: 'Infrastructure'
     - type: tag
       key: 'ProjectId'
       value: '1234567'


diff --git a/tests/data/placebo/test_cwe_rule_tags/events.ListRules_1.json b/tests/data/placebo/test_cwe_rule_tags/events.ListRules_1.json
new file mode 100644
index 000000000..c7368ccda
--- /dev/null
+++ b/tests/data/placebo/test_cwe_rule_tags/events.ListRules_1.json
@@ -0,0 +1,16 @@
+{
+    "status_code": 200,
+    "data": {
+        "Rules": [
+            {
+                "Name": "cloud-custodian-mailer",
+                "Arn": "arn:aws:events:us-west-2:644160558196:rule/cloud-custodian-mailer",
+                "State": "ENABLED",
+                "Description": "Cloud Custodian Mailer",
+                "ScheduleExpression": "rate(5 minutes)",
+                "EventBusName": "default"
+            }
+        ],
+        "ResponseMetadata": {}
+    }
+}
diff --git a/tests/data/placebo/test_cwe_rule_tags/events.ListTagsForResource_1.json b/tests/data/placebo/test_cwe_rule_tags/events.ListTagsForResource_1.json
new file mode 100644
index 000000000..954290d0f
--- /dev/null
+++ b/tests/data/placebo/test_cwe_rule_tags/events.ListTagsForResource_1.json
@@ -0,0 +1,12 @@
+{
+    "status_code": 200,
+    "data": {
+        "Tags": [
+            {
+                "Key": "App",
+                "Value": "Custodian"
+            }
+        ],
+        "ResponseMetadata": {}
+    }
+}
\ No newline at end of file
diff --git a/tests/data/placebo/test_cwe_rule_tags/tagging.GetResources_1.json b/tests/data/placebo/test_cwe_rule_tags/tagging.GetResources_1.json
new file mode 100644
index 000000000..d35bd3667
--- /dev/null
+++ b/tests/data/placebo/test_cwe_rule_tags/tagging.GetResources_1.json
@@ -0,0 +1,13 @@
+{
+    "status_code": 200,
+    "data": {
+        "PaginationToken": "",
+        "ResourceTagMappingList": [
+            {
+                "ResourceARN": "arn:aws:events:us-west-2:644160558196:rule/cloud-custodian-mailer",
+                "Tags": []
+            }
+        ],
+        "ResponseMetadata": {}
+    }
+}
diff --git a/tests/data/placebo/test_cwe_rule_tags/tagging.TagResources_1.json b/tests/data/placebo/test_cwe_rule_tags/tagging.TagResources_1.json
new file mode 100644
index 000000000..bd2dead85
--- /dev/null
+++ b/tests/data/placebo/test_cwe_rule_tags/tagging.TagResources_1.json
@@ -0,0 +1,7 @@
+{
+    "status_code": 200,
+    "data": {
+        "FailedResourcesMap": {},
+        "ResponseMetadata": {}
+    }
+}
\ No newline at end of file
diff --git a/tests/data/placebo/test_cwe_rule_target_cross/tagging.GetResources_1.json b/tests/data/placebo/test_cwe_rule_target_cross/tagging.GetResources_1.json
new file mode 100644
index 000000000..958027559
--- /dev/null
+++ b/tests/data/placebo/test_cwe_rule_target_cross/tagging.GetResources_1.json
@@ -0,0 +1,8 @@
+{
+    "status_code": 200,
+    "data": {
+        "PaginationToken": "",
+        "ResourceTagMappingList": [],
+        "ResponseMetadata": {}
+    }
+}
diff --git a/tests/test_cwe.py b/tests/test_cwe.py
index b34ff1509..76c6afe09 100644
--- a/tests/test_cwe.py
+++ b/tests/test_cwe.py
@@ -19,7 +19,28 @@ from .common import event_data, BaseTest
 from c7n.cwe import CloudWatchEvents
 
 
-class CloudWatchRuleTarget(BaseTest):
+class CloudWatchEventTest(BaseTest):
+
+    def test_event_rule_tags(self):
+        factory = self.replay_flight_data('test_cwe_rule_tags')
+        client = factory().client('events')
+        policy = self.load_policy(
+            {
+                'name': 'cwe-rule',
+                'resource': 'aws.event-rule',
+                'filters': [
+                    {'tag:App': 'absent'},
+                    {'Name': 'cloud-custodian-mailer'}],
+                'actions': [
+                    {'type': 'tag', 'tags': {'App': 'Custodian'}}]
+            }, session_factory=factory, config={'region': 'us-west-2'})
+        resources = policy.run()
+        self.assertEqual(len(resources), 1)
+        tags = {t['Key']: t['Value'] for t in
+                client.list_tags_for_resource(
+                    ResourceARN=policy.resource_manager.get_arns(resources)[0]).get(
+                        'Tags')}
+        self.assertEqual(tags, {'App': 'Custodian'})
 
     def test_target_cross_account_remove(self):
         session_factory = self.replay_flight_data("test_cwe_rule_target_cross")

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
apt-get update apt-get install -y gcc
3.8
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
apipkg==1.5
appdirs==1.4.3
argcomplete==1.11.1
attrs==19.3.0
aws-xray-sdk==2.5.0
bleach==3.1.4
boto3==1.12.47
botocore==1.15.47
-e git+https://github.com/cloud-custodian/cloud-custodian.git@b341b670cfc02564e09ecc80260f73d862f26195#egg=c7n
certifi==2020.4.5.1
cffi==1.14.0
chardet==3.0.4
coverage==5.1
cryptography==2.9.2
distlib==0.3.0
docutils==0.15.2
entrypoints==0.3
exceptiongroup==1.2.2
execnet==1.7.1
filelock==3.0.12
flake8==3.7.9
future==0.18.2
idna==2.9
importlib-metadata==1.6.0
iniconfig==2.1.0
jeepney==0.4.3
jmespath==0.9.5
jsonpatch==1.25
jsonpickle==1.4.1
jsonpointer==2.0
jsonschema==3.2.0
keyring==21.2.0
mccabe==0.6.1
mock==4.0.2
more-itertools==8.2.0
multidict==4.7.5
packaging==20.3
pkginfo==1.5.0.1
placebo==0.9.0
pluggy==1.5.0
psutil==5.7.0
py==1.8.1
pycodestyle==2.5.0
pycparser==2.20
pyflakes==2.1.1
Pygments==2.6.1
pyparsing==2.4.7
pyrsistent==0.16.0
pytest==8.3.5
pytest-asyncio==0.24.0
pytest-cov==2.8.1
pytest-forked==1.1.3
pytest-mock==3.14.0
pytest-sugar==0.9.3
pytest-xdist==1.31.0
python-dateutil==2.8.1
PyYAML==5.3.1
readme-renderer==26.0
requests==2.23.0
requests-toolbelt==0.9.1
s3transfer==0.3.3
SecretStorage==3.1.2
six==1.14.0
tabulate==0.8.7
termcolor==1.1.0
toml==0.10.0
tomli==2.2.1
tox==3.14.6
tqdm==4.45.0
twine==3.1.1
urllib3==1.25.9
vcrpy==4.0.2
virtualenv==20.0.18
wcwidth==0.1.9
webencodings==0.5.1
wrapt==1.12.1
yarl==1.4.2
zipp==3.1.0

name: cloud-custodian
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=24.2=py38h06a4308_0
  - python=3.8.20=he870216_0
  - readline=8.2=h5eee18b_0
  - setuptools=75.1.0=py38h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.44.0=py38h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - apipkg==1.5
      - appdirs==1.4.3
      - argcomplete==1.11.1
      - attrs==19.3.0
      - aws-xray-sdk==2.5.0
      - bleach==3.1.4
      - boto3==1.12.47
      - botocore==1.15.47
      - c7n==0.9.1
      - certifi==2020.4.5.1
      - cffi==1.14.0
      - chardet==3.0.4
      - coverage==5.1
      - cryptography==2.9.2
      - distlib==0.3.0
      - docutils==0.15.2
      - entrypoints==0.3
      - exceptiongroup==1.2.2
      - execnet==1.7.1
      - filelock==3.0.12
      - flake8==3.7.9
      - future==0.18.2
      - idna==2.9
      - importlib-metadata==1.6.0
      - iniconfig==2.1.0
      - jeepney==0.4.3
      - jmespath==0.9.5
      - jsonpatch==1.25
      - jsonpickle==1.4.1
      - jsonpointer==2.0
      - jsonschema==3.2.0
      - keyring==21.2.0
      - mccabe==0.6.1
      - mock==4.0.2
      - more-itertools==8.2.0
      - multidict==4.7.5
      - packaging==20.3
      - pkginfo==1.5.0.1
      - placebo==0.9.0
      - pluggy==1.5.0
      - psutil==5.7.0
      - py==1.8.1
      - pycodestyle==2.5.0
      - pycparser==2.20
      - pyflakes==2.1.1
      - pygments==2.6.1
      - pyparsing==2.4.7
      - pyrsistent==0.16.0
      - pytest==8.3.5
      - pytest-asyncio==0.24.0
      - pytest-cov==2.8.1
      - pytest-forked==1.1.3
      - pytest-mock==3.14.0
      - pytest-sugar==0.9.3
      - pytest-xdist==1.31.0
      - python-dateutil==2.8.1
      - pyyaml==5.3.1
      - readme-renderer==26.0
      - requests==2.23.0
      - requests-toolbelt==0.9.1
      - s3transfer==0.3.3
      - secretstorage==3.1.2
      - six==1.14.0
      - tabulate==0.8.7
      - termcolor==1.1.0
      - toml==0.10.0
      - tomli==2.2.1
      - tox==3.14.6
      - tqdm==4.45.0
      - twine==3.1.1
      - urllib3==1.25.9
      - vcrpy==4.0.2
      - virtualenv==20.0.18
      - wcwidth==0.1.9
      - webencodings==0.5.1
      - wrapt==1.12.1
      - yarl==1.4.2
      - zipp==3.1.0
prefix: /opt/conda/envs/cloud-custodian

tests/test_cwe.py::CloudWatchEventTest::test_event_rule_tags
tests/test_cwe.py::CloudWatchEventTest::test_target_cross_account_remove tests/test_cwe.py::CloudWatchEventsFacadeTest::test_asg_state tests/test_cwe.py::CloudWatchEventsFacadeTest::test_cloud_trail_resource tests/test_cwe.py::CloudWatchEventsFacadeTest::test_custom_event tests/test_cwe.py::CloudWatchEventsFacadeTest::test_ec2_state tests/test_cwe.py::CloudWatchEventsFacadeTest::test_get_ids tests/test_cwe.py::CloudWatchEventsFacadeTest::test_get_ids_multiple_events tests/test_cwe.py::CloudWatchEventsFacadeTest::test_get_ids_sans_with_details_expr tests/test_cwe.py::CloudWatchEventsFacadeTest::test_get_ids_sans_without_details_expr tests/test_cwe.py::CloudWatchEventsFacadeTest::test_non_cloud_trail_event
c7n/query.py Makefile tox.ini c7n/resources/cw.py c7n/resources/vpc.py
c7n/query.py Makefile tox.ini c7n/resources/cw.py c7n/resources/vpc.py