Search code examples
google-cloud-platformcloudcustodian

GCP-Audit Cloud Custodian


I've been trying out cloud custodian and looking at this article trying the simplest thing using gcp-audit (all services/APIs needed are enabled)

policies:
  - name: gcp-uniform-access-storage-remediation
    resource: gcp.bucket
    mode:
      type: gcp-audit
      methods:
        - storage.buckets.create
        - storage.buckets.update
    filters:
      - type: value
        key: iamConfiguration.uniformBucketLevelAccess.enabled
        value: false
    actions:
      - type: set-uniform-access

https://medium.com/google-cloud/compliance-as-code-and-auto-remediation-on-google-cloud-with-cloud-custodian-e488ca6ab06c

Running the policy seems like but when adding the function of gcp-audit it seems to fail and triggering the cloud function manually it just shows crash with no other information, has anyone had any similar issue? Appreciate any help.


Solution

  • It seems deleting the log sink router and re-deploy solves the issue for me